ZSoft IBM PC Paintbrush file

.pcx · Images

PCX is a raster image format from the MS-DOS era. It was the native format of PC Paintbrush, the painting program from ZSoft, and for about ten years it was one of the most common ways to store pictures on IBM-compatible PCs. Today PCX files turn up in old archives, in scans and faxes saved by 1990s software, in the data folders of DOS and early Windows games (Quake II keeps its skins as PCX), and on thermal label printers that still accept a black-and-white PCX as a logo.

Where PCX came from

ZSoft Corporation of Marietta, Georgia, released PC Paintbrush for MS-DOS in 1984–85 as a rival to IBM's PCPaint. The format grew together with PC graphics cards, from CGA through EGA and VGA to Super VGA, and the version byte in the header tells you which generation wrote a file:

  • 0 – PC Paintbrush 2.5
  • 2 and 3 – version 2.8, with and without palette information
  • 4 – PC Paintbrush for Windows
  • 5 – version 3.0 and later, the only one that can hold 256 colours and 24-bit images

There never was a formal standard, only ZSoft's technical reference manual. ZSoft merged with Mediagenic in 1989 and the format stopped evolving. PCX is obsolete, but well understood and easy to read.

How a PCX file is built

  • A 128-byte header that starts with the byte 0x0A and stores the version, image size, resolution in dpi, bits per pixel, number of colour planes and a 16-colour palette.
  • Run-length encoding (RLE). Lossless and very simple: repeated pixels are stored as a count and a value. Flat areas and line art shrink well, photographs hardly at all. A scanned photo saved as PCX can end up larger than an uncompressed BMP.
  • Colour depth: 1-bit black and white, 16 colours in four bit planes (the EGA layout), 8-bit with a 256-colour palette, and 24-bit true colour stored as three planes per row.
  • The 256-colour palette sits at the very end of the file: 768 bytes preceded by a marker byte with the value 12. Programs that do not look there show 8-bit images in wrong colours.
  • No colour profile, no layers and practically no metadata. Transparency was never part of the original design.

A close relative, DCX, packs up to 1,024 PCX pages into one file. Fax software used it for multi-page documents.

How to open a PCX file

  • Windows 10 and 11: neither Photos nor Paint opens PCX. Use IrfanView or XnView MP (both free for private use), GIMP, or Adobe Photoshop.
  • macOS: GIMP, XnView MP or GraphicConverter.
  • Linux: GIMP, XnView MP or Netpbm (pcxtoppm).
  • Phone: gallery apps do not show PCX. Convert the file to PNG or JPG first.

Common PCX problems

PCX file won't open on Windows 11

Windows has no PCX decoder, so a double-click only offers to pick an app. Install one of the viewers above or convert the file to PNG.

Colours are wrong or the picture looks like noise

Typically a 256-colour file read by a program that ignores the palette at the end, or a 16-colour EGA file with planar data read as if it were packed. Try another viewer. Our converter handles both layouts.

A .dcx fax has several pages but only one is visible

Convert the DCX to multi-page TIFF or PDF. Our converter keeps all pages for these two targets.

Label printer ignores my PCX logo

Zebra printers with the EPL language store graphics only as 1-bit black-and-white PCX. A grey or colour PCX is rejected. Convert your logo to PBM first, which forces pure black and white, and then convert the PBM to PCX. A 1-bit source gives a 1-bit PCX.

Converting PCX

PCX is usually converted to PNG, which is lossless as well, keeps palette colours exactly and opens everywhere. For photographs JPG is smaller. How our converter handles PCX:

  • PCX to PNG, TIFF, BMP or GIF keeps every pixel. PCX to JPG uses quality 90.
  • When writing PCX, the depth follows the source: black-and-white images become 1-bit, images with up to 16 colours use the EGA plane layout, up to 256 colours an 8-bit palette, anything else 24-bit.
  • A transparent source (PNG, WebP) is written with a fourth alpha plane. Most DOS-era programs do not understand it, so remove transparency first if the PCX is meant for old software.

PCX at a glance

DeveloperZSoft Corporation (USA)
First release1984–85, with PC Paintbrush for MS-DOS
Last version5 (PC Paintbrush 3.0 and later), no formal standard
TypeRaster image
CompressionRLE, lossless
Colour depth1, 4 (planes), 8 (palette) and 24 bits
Typical use todayLegacy archives, DOS games, fax (DCX), label printer logos

Further reading: PCX format description at the Library of Congress and the PCX chapter of the Encyclopedia of Graphics File Formats.

We can convert PCX into

Documents

PDF TXTPDF/A

Images

JPG PNGWEBP GIF TIFFHEICAVIFJXLPSDICOAAIAPNGARTAVS BMP CINCURDCMDCXDDSDPXFF FITSFL32 HDRHRZJP2JBIGJNGJPCMNGMTVOTBPALMPAM PBMPCDPFMPGMPGXPHMPICTPPMPSBPTIFQOIRASRGFSGISIXELSUN TGAVICARVIFFVIPS WBMPXBMXPMXWD

Vector images

SVG EPSEMF PSFXGHPGLPOVSIFSVGZWMFXAML

eBooks

EPUB MOBI AZW3 FB2CBZDJVUHTMLZ LIT LRF OEB PDB TCRTXTZCB7CBT