- published: 05 Feb 2016
- views: 953
PCX is an image file format developed by the now-defunct ZSoft Corporation of Marietta, Georgia. It was the native file format for PC Paintbrush (PCX = "Personal Computer eXchange") and became one of the first widely accepted DOS imaging standards, although it has since been succeeded by more sophisticated image formats, such as GIF, JPEG and PNG. PCX files commonly stored palette-indexed images ranging from 2 or 4 colors to 16 and 256 colors, although the format has been extended to record true-color (24-bit) images as well.
PCX was designed during the early development of PC display hardware and most of the formats it supported are no longer used, Table A shows a list of the most commonly used PCX formats. Contemporary image editing programs may not read PCX files that match older hardware.
A PCX file has three main sections, in the following order
PCX files were designed for use on IBM-compatible PCs and always use little endian byte ordering.
The PCX file header contains an identifier byte (value 10), a version number, image dimensions, 16 palette colors, number color planes, bit depth of each plane and a value for compression method. PCX version numbers range from 0 to 5, this originally denoted the version of the PC Paintbrush program used to create the PCX file. All PCX files use the same compression scheme and the compression value is always 1. No other values have been defined and there are no uncompressed PCX files. The header always has space for 16 colors though the number of colors used depends upon the bit depth of the image. The header is 74 bytes long and the image data begins 128 bytes after the start of the file, the 54 bytes between are not used.