Skip to content

Instantly share code, notes, and snippets.

@stungeye
Last active July 6, 2024 04:05
Show Gist options
  • Save stungeye/9c57dc4cfd2d541e3f0c330102d63d31 to your computer and use it in GitHub Desktop.
Save stungeye/9c57dc4cfd2d541e3f0c330102d63d31 to your computer and use it in GitHub Desktop.
PPM Image File Examples
P1
# PBM Black & White Example
24 7
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0
0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0
0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0
0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0
0 1 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
P3
# PPM Colour Example Multiple Pixels Per File Line
# NOTE: A blank line is required at the end of this file that gist has removed.
4 4
15
0 0 0 0 0 0 0 0 0 15 0 15
0 0 0 0 15 7 0 0 0 0 0 0
0 0 0 0 0 0 0 15 7 0 0 0
15 0 15 0 0 0 0 0 0 0 0 0
P3
# PPM Colour Example One Pixel Per File Line
# NOTE: A blank line is required at the end of this file that gist has removed.
4 4
15
0 0 0
0 0 0
0 0 0
15 0 15
0 0 0
0 15 7
0 0 0
0 0 0
0 0 0
0 0 0
0 15 7
0 0 0
15 0 15
0 0 0
0 0 0
0 0 0
P6
# PPM Colour Example Raw Bytes Mode
4 4
255
� � �w �w � �
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment