PCX: Difference between revisions

Content deleted Content added
Small reformat for image data layout
m Reverted edit by Manwichosu (talk) to last version by Timwi
 
(2 intermediate revisions by 2 users not shown)
Line 201:
A PCX file has space in its header for a 16 color palette. When 256-color VGA hardware became available there was not enough space for the palette in a PCX file; even the 54 unused bytes after the header would not be enough. The solution chosen was to put the palette at the end of the file, along with a marker byte to confirm its existence.
 
If a PCX file has a 256-color palette, it is found 768 bytes from the end of the file. In this case the value in the byte preceding the palette should be 12 (0x0C). The palette is stored as a sequence of RGB triples; its usable length is defined by the number of colors in the image. ColorsColor values in a PCX palette always use 8 bits, regardless of the bit depth of the image.
 
==References==