home *** CD-ROM | disk | FTP | other *** search
- 0 m String (e.g. 'Translator') to indicate the maker, or some other
- comment (e.g. date, image contents, whatever)
- m 1 0 (string terminator)
- m+1 4 Version number *100 (or any other informational value)
- m+5 4 Width of image in pixels (w)
- m+9 4 Height of image in pixels (h)
- m+13 4 Bits per pixel (bpp)
- - If 1<=bpp<=8, then 24-bit palette entries for all colours
- follow (i.e. n=3*2^bpp, and l (bytes per pixel) is 1).
- - If bpp>8, then pure 24-bit RGB is stored, which needs no
- palette (i.e. n=0, and l (bytes per pixel) is 3)
- m+17 n Palette entries for all colours (only if 1<=bpp<=8), which
- are triples of byte values (0=off, up to 255=full intensity),
- one byte per primary colour, red first, then green, then blue.
- For example, when 'Rx','Gx' and 'Bx' represent the intensities
- of red, green and blue respectively for colour x, the palette
- for 4 colours (bpp=2) would be stored : R0,G0,B0, R1,G1,B1,
- R2,G2,B2, R3,G3,B3.
- m+17+n w*h*l Pixel values, representing the image rows from top to bottom
- and within every row the pixels from left to right.
- - If l=1, every pixel value is a byte representing the colour
- number/index.
- - If l=3 (pure 24-bit RGB), data is stored like the palette
- entries, i.e. red first, then green, finally blue, all byte
- values (0-255) representing the intensity of the corresponding
- primary colour for that pixel.
- ----------------------------------------------------------------------------
- This text was extracted from !Translator.Docs.Guide from John Kortink