
PPM files are a type of image file called a pixmap. PPMs allow for full RGB color and come in two types: ASCII and binary. ASCII files are designed for human-readability. They also transport well to a variety of other platforms. Binary files are easier to parse due to the lack of white space, and they are efficient at saving file space. To determine which type of PPM file you have, look at the magic number.
Instructions
- 1Open the PPM file so that you can read the code.
- 2Locate the two-byte magic number on the first line.
- 3Compare the magic number to the following key:
P3 = PPM ASCII
P6 = PPM Binary
- 1