home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / pcx / pcxhead / pcxstruc.pas
Encoding:
Pascal/Delphi Source File  |  1992-01-17  |  2.8 KB  |  54 lines

  1. pcx_header = record
  2.      Manufacturer: byte;     { Always 10 for PCX file }
  3.      Version: byte;          { 2 - old PCX - no palette (not used
  4.                                            anymore)
  5.                                3 - no palette,
  6.                                4 - Microsoft Windows - no palette (only
  7.                                                            in
  8.                                    old files, new Windows version uses
  9.                             type 3)
  10.                                5 - with palette }
  11.      Encoding: byte;         { 1 is PCX, it is possible that we may add
  12.                                additional encoding methods in the future
  13. Bits_per_pixel: byte;   { Number of bits to represent a pixel
  14.                                (per plane) - 1, 2, 4, or 8 }
  15.      Xmin: integer;          { Image window dimensions (inclusive) }
  16.      Ymin: integer;          { Xmin, Ymin are usually zero (not always)
  17. Xmax: integer;
  18.      Ymax: integer;
  19.      Hdpi: integer;          { Resolution of image (dots per inch) }
  20. Vdpi: integer;          { Set to scanner resolution - 300 is default }
  21.      ColorMap: array [0..15, RED..BLUE] of byte;
  22.                              { RGB palette data (16 colors or less)
  23.                                256 color palette is appended to end of
  24.                       file}
  25.      Reserved: byte;         { (used to contain video mode)
  26.                                now it is ignored - just set to zero }
  27.      Nplanes: byte;          { Number of planes }
  28.      Bytes_per_line_per_plane: integer;   { Number of bytes to allocate
  29.  
  30.                                             MUST be an an EVEN number!
  31.                                             Do NOT calculate from
  32.                               Xmax-Xmin
  33.      PaletteInfo: integer;   { 1 = black & white or color image,
  34.                                   2 = grayscale image - ignored in PB4,
  35.                             PB4
  36.                                palette must also be set to shades of
  37.                     gray}
  38.        HscreenSize: integer;   { added for PC Paintbrush IV Plus ver
  39.                       1.0 plus}
  40.        VscreenSize: integer;   { PC Paintbrush IV ver 1.02 (and later)
  41.                        { I know it is tempting to use these
  42.              fields
  43.                                  to determine what video mode should be
  44.                          put in
  45.                                  to display the image - but it is NOT
  46.                                  recommended since the fields will
  47.                     probalbly
  48.             just contain garbage.  It is better to
  49.                                  the user install for the graphics mode
  50.                          wants to use... }
  51.        Filler: array [74..127] of byte;     { Just set to zeros }
  52.        end;
  53.  
  54.