Business Software: | Home and Family: | ||
Load! - Container Optimization | Ages! - Family Tree Software |
Name | Description | ||
---|---|---|---|
Header | Signature 2 byte format signature: "P1" (ASCII codes 80 and 49): PBM ASCII black+white "P2" (ASCII codes 80 and 50): PGM ASCII grayscale "P3" (ASCII codes 80 and 51): PPM ASCII colored "P4" (ASCII codes 80 and 52): PBM RAW black + white "P5" (ASCII codes 80 and 53): PGM RAW grayscale "P6" (ASCII codes 80 and 54): PPM RAW colored | ||
(Whitespace) | |||
Width | Bitmap Width | ||
(Whitespace) | |||
Height | Bitmap Height | ||
Data Precision | present in PGM and PPM files, but not in PBM | ||
(Whitespace) | |||
MaxValue | PBM: not present PGM: Value to be considered as white. PPM: Value to be considered as max. for all three color components. This value needs to be >0, and can be >255 if in ASCII format! | ||
Raster Data Block | see below |
Name | Description | |||
---|---|---|---|---|
(Whitespace) | ||||
Pixel | ASCII pixel. 0 (ASCII 48) =white, 1 (ASCII 49) = black. | |||
repeated Width times | ||||
repeated Height times |
Name | Description | |||
---|---|---|---|---|
(Whitespace) | ||||
Pixel | A pixel's gray value. Must be between 0 and Header.MaxValue | |||
repeated Width times | ||||
repeated Height times |
Name | Description | |||
---|---|---|---|---|
(Whitespace) | ||||
Pixel Red | A pixel's red component. Must be between 0 and Header.MaxValue | |||
(Whitespace) | ||||
Pixel Green | A pixel's green component. Must be between 0 and Header.MaxValue | |||
(Whitespace) | ||||
Pixel Blue | A pixel's blue component. Must be between 0 and Header.MaxValue | |||
repeated Width times | ||||
repeated Height times |
Name | Size | Description | ||
---|---|---|---|---|
Seperator | 1 byte | A single byte of whitespace (preferably a LF) that seperates MaxValue from the Pixel data | ||
PixelData | 1 byte | A single byte with the pixel data for 8 pixels. Within each byte every bit represents one pixel | ||
1 bit (bit 7) | leftmost pixel | |||
... | ||||
1 bit (bit 0) | rightmost pixel. Pixels wrap along lines, so this pixel could already actualy be on then next line. | |||
repeated (Width*Height+7) div 8 times. (where div is integer division) |
Name | Size | Description | |||
---|---|---|---|---|---|
Seperator | 1 byte | A single byte of whitespace (preferably a LF) that seperates MaxValue from the Pixel data | |||
Pixel | 1 byte | A single byte with the pixel's gray value. | |||
repeated Width times | |||||
repeated Height times |
Name | Size | Description | |||
---|---|---|---|---|---|
Seperator | 1 byte | A single byte of whitespace (preferably a LF) that seperates MaxValue from the Pixel data | |||
Red | 1 byte | A single byte with the pixel's red component. | |||
Green | 1 byte | A single byte with the pixel's green component. | |||
Blue | 1 byte | A single byte with the pixel's blue component. | |||
repeated Width times | |||||
repeated Height times |