What is PCX? PiCture eXchange Format Explained
An early DOS-era raster format from ZSoft's PC Paintbrush, using run-length encoding compression.
Last updated:
What is PCX?
PCX, short for PiCture eXchange, is a raster image file format developed by the now-defunct ZSoft Corporation of Marietta, Georgia. ZSoft introduced it in 1985 as the native format for its PC Paintbrush program, and it became one of the first widely accepted DOS imaging standards.
A PCX file consists of a 128-byte header describing dimensions, color planes, and palette information, followed by image data compressed with a simple byte-wise run-length encoding (RLE) scheme. In the RLE method, the two most significant bits of a byte signal whether it is a run-length count or a literal pixel value, allowing repeated pixels to be stored compactly.
How PCX Works
PCX stores a raster image using a fixed size header followed by compressed pixel data. The header records essential details such as a version indicator, the image dimensions, the number of bits per pixel, and the number of color planes. Because the header layout is fixed, a reader can parse these fields at known offsets before touching the image body.
For compression, PCX uses a simple form of run length encoding. Instead of storing every pixel individually, it collapses consecutive runs of the same value into a short code that says, in effect, repeat this value this many times. This works well on images with large flat areas of a single color, which were common in the icons, screenshots, and drawn graphics of the DOS era.
The pixel data is organized as scanlines, one row at a time. For images with multiple color planes, the planes for a given row are typically stored one after another rather than interleaved pixel by pixel. A decoder walks through the run length codes, expanding them back into full scanlines according to the width and plane count declared in the header.
Color handling depends on bit depth. For low bit depth images the palette is small enough to sit inside the header itself, while for 256 color images a full palette is appended at the end of the file, after the image data, marked so that readers can find it. This split arrangement is a quirk of the format's incremental history.
History and Standardization
PCX was created by ZSoft Corporation for its PC Paintbrush program, which is where the name comes from. It dates to the early to mid 1980s, making it one of the oldest raster image formats to see wide use on personal computers, and it spread alongside the popularity of that paint software.
Because the format evolved over several versions, later revisions added capabilities such as deeper color support, which is why features like the appended 256 color palette were bolted on rather than designed in from the beginning. There was no formal international standards body governing it; PCX was a de facto standard defined by its documentation and by the behavior of the software that read and wrote it.
During the DOS era PCX was extremely common, but as computing moved on it was largely superseded by formats such as GIF, BMP, and eventually PNG. Today it is mainly encountered when dealing with older files or legacy software rather than as a format chosen for new work.
PCX Compared to Other Formats
Compared to BMP, PCX at least attempts compression, since classic BMP files are frequently stored uncompressed and can be larger. BMP is arguably simpler to parse and became more universally supported on later systems, so it often displaced PCX even though PCX files could be smaller on suitable images.
Compared to GIF, PCX generally loses on compression for palette based images. GIF uses LZW compression, which handles a wider range of patterns than plain run length encoding and typically produces smaller files for the limited color graphics both formats target. GIF also added animation, which PCX never had.
Compared to modern PNG, PCX is clearly outmatched: PNG offers much stronger lossless compression, transparency, and broad support across current software. The honest assessment is that PCX run length encoding is weak, effective mainly on images with long stretches of identical pixels and poor on photographs, so PCX survives today chiefly for compatibility with old files rather than for any technical advantage.
MKV Technical Specifications
PCX vs Other Image Formats
| Feature | PCX | BMP | PNG |
|---|---|---|---|
| Type | Raster | Raster | Raster |
| Compression | RLE[1] | None or RLE | Lossless |
| Color depth | Up to 24-bit[2] | Up to 32-bit | Up to 16-bit |
| Transparency | No[2] | Limited | Yes |
| Era | Legacy DOS/PC[1] | Windows | Modern web |
| Best for | Legacy paint files | Windows images | Web graphics |
PCX was a widely used early PC paint format with simple RLE compression, but it has largely been superseded by BMP and PNG.
Advantages & Disadvantages
Advantages
PCX applies simple run-length encoding that reduces file size on images with runs of identical pixels without discarding data.
Its fixed header and straightforward RLE scheme make PCX easy to parse and implement.
As an early DOS standard, PCX was supported by a wide range of legacy graphics and paint software.
The format handles indexed-color images with embedded palettes as well as multi-plane color data.
Disadvantages
PCX has been superseded by formats such as BMP, JPEG, and PNG and is rarely used in modern workflows.
Its byte-wise RLE is ineffective on complex or photographic images, where it can offer little size benefit.
Many contemporary applications no longer read or write PCX without specialized tools.
Common Use Cases
PCX is encountered mainly when working with legacy DOS-era graphics.
Legacy file recovery
PCX support is needed to open images created by older PC Paintbrush and DOS applications.
Retro and archival graphics
The format appears in archives of vintage software, clip art, and game assets.
Simple indexed images
PCX can still serve as a straightforward container for palette-based images with run-length compression.
Convert PCX Files Free
Use our free online image converter to convert PCX and other formats - no signup, no watermarks.
Try Image Converter FreeHow to open a PCX file
PCX files, a legacy image format originally developed by ZSoft for DOS-based systems, are supported by various software tools that cater to different user needs. Professional-grade applications provide extensive editing capabilities, while free and open-source options offer basic viewing and editing functionalities. Browser-based tools are convenient for quick access without installation, and built-in system tools may provide minimal support for viewing PCX files.
When selecting software for PCX, consider factors such as feature fidelity, the distinction between editing and viewing capabilities, and the cost model. Users may prioritize platform compatibility and the ability to export to modern formats, as converting PCX files to more widely used formats may be necessary for broader usability. Understanding the specific needs for editing versus simple viewing can also guide the choice of the most suitable application.
Adobe Photoshop 2024
Adobe Photoshop is a leading image editing software that supports PCX files for both viewing and editing. It offers high fidelity in handling PCX graphics, allowing users to manipulate images with precision and save them in various formats.
- Advanced layer and mask editing
- Support for 16-bit color depth
- Extensive filter and effect options
- Vector shape tools and smart objects
- Batch processing capabilities
- Comprehensive editing tools for PCX
- High fidelity and color accuracy
- Industry-standard for graphic design
- Subscription model can be costly
- Complex interface for beginners
Exports to: PNG, JPG, TIFF, PDF, BMP
Best for: Choose Adobe Photoshop for professional-grade editing of PCX files with extensive features.
Visit Adobe Photoshop →GIMP 2.10.34
GIMP is a powerful open-source image editor that supports PCX files, allowing users to view and edit images effectively. It provides a range of features comparable to commercial software, making it a solid choice for those needing flexibility without cost.
- Layer and mask support
- Customizable brushes and tools
- Image manipulation and retouching
- Scriptable with Python
- Support for various color modes
- Completely free and open-source
- Strong community support and plugins
- Cross-platform compatibility
- Steeper learning curve for new users
- Occasional performance issues on large files
Exports to: PNG, JPG, TIFF, GIF, BMP
Best for: GIMP is ideal for users seeking a free, versatile tool for editing PCX files without sacrificing features.
Visit GIMP →IrfanView 4.60
IrfanView is a lightweight image viewer that supports PCX files, primarily focusing on quick viewing and basic editing. It is particularly useful for users who need a fast and efficient way to handle PCX images without extensive editing capabilities.
- Batch conversion of image formats
- Basic editing tools like cropping
- Slideshow creation functionality
- Support for plugins to extend features
- Multi-language support
- Fast and lightweight application
- Easy to use for quick tasks
- Batch processing capabilities
- Limited advanced editing features
- Windows-only platform
Exports to: PNG, JPG, BMP, GIF, TIFF
Best for: IrfanView is perfect for users who need a quick and efficient viewer for PCX files with basic editing options.
Visit IrfanView →XnView MP 1.00
XnView MP is a versatile media viewer and converter that supports PCX files, offering a balance between viewing and basic editing. It is well-suited for users who require a multi-platform solution for managing and converting images.
- Multi-format image viewing
- Basic editing tools like resizing
- Batch conversion and renaming
- Metadata editing capabilities
- Slideshow and screen capture features
- Supports a wide range of formats
- Cross-platform availability
- User-friendly interface
- Limited advanced editing features
- Paid version required for some features
Exports to: PNG, JPG, TIFF, BMP, GIF
Best for: XnView MP is a great choice for users needing a comprehensive viewer and converter for PCX files across multiple platforms.
Visit XnView MP →