PCX: Difference between revisions

Content deleted Content added
PCX file format: Default table layout and positioning.
Line 190:
PCX image data are compressed using [[run-length encoding]] (RLE), a simple [[lossless compression]] algorithm that collapses a series of three or more consecutive bytes with identical values into a two-byte pair. The two most-significant bits of a byte are used to determine whether the given data represent a single [[pixel]] of a given palette index or color value, or an RLE pair representing a series of several pixels of a single value:
# if both bits are 1, the byte is interpreted as the run length. This leaves 6 bits for the actual run length value, i.e. a value range of 0-63
# in any other case, the byte is interpreted as a single pixel value. This leaves all valuevalues for which bit #7 and bit #8 are not 1 at the same time. This requirement is not met by all values of 192 (binary 11000000) and above.
Compared to the maximum run length of 128, possible with [[Truevision TGA|TGA]] RLE compression, the PCX run-length encoding offers a larger single-pixel value range, while the maximum run length is restricted to 63.