This is the homepage of Peter Alexander. I am currently at Facebook working on AR/VR. Any opinions are my own.
Recent Posts
- Single-Threaded Parallelism
- unique_ptr Type Erasure
- The Condenser Part 1
- Cube Vertex Numbering
- Range-Based Graph Search in D
All Posts
Links
github.com/Poita@Poita_
Atom Feed
Simplest Image Format
Posted: 2013-01-29 - Link
Just a quick post to share something I discovered a few days ago: the simplest image format ever. I’m actually quite surprised it took me so long to find it, which is why I’m sharing now.
The format I’m talking about is the Portable Pixmap Format (.ppm). It’s so simple to write that it’s easier to describe using code:
That’s it: a small header followed by the raw image data.
It’s incredibly useful to have a simple file format like this when you want to write out some images at runtime and don’t have any other image writing libraries available (or can’t be bothered hooking them up).