| || |
Join Date: May 2011
Re: How to determine the ppm file type?
The PPM stands for the “Portable Pixel Map”. Ppm file consist of sequential order of ppm images. Image contains:
- Magic number to identify the type. This number is of two characters. That is P6.
- It also includes whitespace .
- It has height and width specified as ASCII character in decimal system.
- Maximum color value is specified in ASCII .It is 65536.
- Each pixel is a combination of red, green and blue digit.
- Each sample is in binary format.
- The above mentioned format is one type. It is called normal ppm file. Another type of it is plain format.
- Plain image contains:
- There is only one image.
- It has the magic number as P3.
- Each sample is in decimal format with White-space before and after it.
- It should have at-least one character space between two samples.
- No line has more than 70 characters.