home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / m / mask / !Mask / Docs / ClearFormt next >
Encoding:
Text File  |  1993-05-08  |  1.8 KB  |  28 lines

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