Portable Pixmap: Pixels in plain text
P3
3 2
255
# Row 1
255 0 0 0 255 0 0 0 255
# Row 2
255 255 0 255 255 255 0 0 0
Magic Number
P3 (ASCII) or P6 (Binary).
Dimensions
Width and Height in pixels.
Max Value
Maximum value for each channel.
RGB Data
Sequence of R G B triples.
Portable Pixmap is an extremely simple image format, designed to be easy to read and write by programs without external libraries.
PBM (B/W), PGM (Grayscale), PPM (RGB Color).
Perfect for learning and debugging graphics algorithms.
View gallery generator code →You can create an image with a simple text editor.
Files are large, but they preserve every original bit.
Common bridge between different image formats.
Easy to inspect if something fails during rendering.