poka.sh

Docs

PCX

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

PCX Image Preview.

At a glance

Original creator ZSoft Corporation, for PC Paintbrush
Purpose Raster images from the MS-DOS paint program PC Paintbrush, with run-length-encoded scanlines and EGA or VGA palettes.
Extensions .pcx
Poka parser poka-pcx
Viewer poka-image-with-meta-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B2 Broad (see Breadth tiers)

How much Poka reads

B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-16: parsers/poka-pcx/src/lib.rs and tests/samples.rs. Both corpus files (testPCX.pcx and TypeDetectionExample.pcx) are version 5, RLE, 8 bits x 3 planes (24-bit). The indexed 256-colour path and the planar 1/2/4-bit path are read in code but not exercised by any corpus file. Covers versions 0, 2, 3, 4 and 5 as far as the code reads them.

What Poka does not read

  • version 3 (no palette): the header palette is used instead of the default EGA palette
  • 1-bit monochrome and 2-bit CGA images take colours from the 16-entry header palette; CGA palette flags are not handled and black and white is not forced
  • planar images with more than 4 bits per pixel in total (for example 8 planes) are truncated to 16 colours
  • 256-colour palette is found only by the 0x0C tail marker; 8-bit images without it are shown as a grey ramp
  • uncompressed (encoding 0) files are not decoded
  • palette-info grey flag is displayed but not applied

Background

The Library of Congress says ZSoft, founded by Mark Zachmann in 1980, released PC Paintbrush for MS-DOS in 1984-1985 and calls the format obsolete. Poka decodes the run-length scanlines itself, including planar 1-, 2- and 4-bit images, 8-bit indexed with the 256-colour palette at the end of the file, and 24- and 32-bit images in three or four planes, and shows the result as a PNG.

Versions

Version Identifier Poka Note
PCX versions 0, 2, 4 and 5 0A (ZSoft), version byte 0, 2, 4 or 5 Read The pixel layouts listed in parsers/poka-pcx/src/lib.rs. The corpus holds only version 5, 24-bit files, so the indexed and planar paths are read in code but untested.
PCX version 3 (no palette) 0A (ZSoft), version byte 3 Partly read Such a file should use the default EGA palette, but the code always uses the header palette.

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • image (used; MIT OR Apache-2.0; Rust)
  • png (used; MIT OR Apache-2.0; Rust)
  • pcx (Rust crate) (candidate; Apache-2.0 OR MIT OR WTFPL; Rust; https://github.com/kryptan/pcx) — Reads and writes PCX (paletted and RGB); licences do not cover the test images.

Sources