ImageGear for C and C++ on Windows v19.10 - Updated
PCX
User Guide > File Formats and Compressions > File Formats > File Formats Reference > PCX

Full Name PCX (PC Paintbrush File Format)
Format ID IG_FORMAT_PCX = 31
File Extension(s) *.pcx
Data Type Raster Image
Data Encoding Binary
Color Profile Support No
Multi-Page Support No
Alpha Channel Support No
ImageGear Platforms Support WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC

ImageGear Supported Versions:

ImageGear Supported Features:

ImageGear Read Support:

ImageGear Write Support:

ImageGear Filter Control Parameters:

Filter Control Parameter Type Default Value Available Values Description
SAVE_COMPRESSED AT_BOOL TRUE FALSE, TRUE If TRUE - image is saved with RLE Compression

Comments:

PCX is one of the oldest PC-based bitmap formats. It became well-known when Microsoft used it for their Paintbrush for Windows application and distributed it with every copy of Windows. This format is popular for fax documents because it allows them to be viewed within many popular paint and image display programs. If multiple images are desired in a PCX format, the format known as DCX, designed for this purpose, (and supported by ImageGear), may be used. Please see DCX file format for more information.

The main components of the PCX file format are the fixed length header, the image data, and if it is written for VGA display technology, the palette for the image (this appears as the last structure in the file). The header includes fields including the PCX version, the image size, resolution and position, and an encoding field that always has a value of 1; PCX data is always RLE. (For complex images, this may actually cause the bitmap data to increase in size).

The size and location of the palette associated with the image depends on the version of the PCX. When it was first developed, the limitations of the EGA card led to a palette that contained just 16 colors. PCX also supported CGA, so that the palette contained only 4 colors. Both of these palettes were stored in the palette array structure of the header. When the PCX was modified to display VGA, there was not enough room to store the palette in the header; subsequently, it was located at the end of the file.

References Used

Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.

Kay, David C. and John R. Levine. Graphics File Formats. Windcrest Books, 1992.

Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats. Sebastopol, CA: O'Reilly & Associates, Inc., 1994.