Free webp to jpg
PCX

PiCture eXchange

image/x-pcx Released 1985 · by ZSoft Corporation

The image/x-pcx MIME type represents the PiCture eXchange (PCX) image format. Developed by ZSoft Corporation in the mid-1980s for their PC Paintbrush software, PCX became one of the first widely accepted DOS-era graphics standards. It utilizes a very simple byte-oriented Run-Length Encoding (RLE) compression scheme, which required minimal CPU power to decode. This made it extraordinarily popular for 1990s MS-DOS video games (like DOOM, Duke Nukem 3D, and Quake) for storing textures and UI assets. While eventually superseded by more efficient formats like GIF, JPEG, and PNG, PCX remains historically significant in early PC graphics and retro game development.

Legacy & Raster Graphics Production Ready

Technical Specifications

MIME Type
image/x-pcx
Extensions
.pcx
Container
ZSoft Proprietary Header (128 bytes)
Compression
Run-Length Encoding (RLE)
Algorithms
ZSoft RLE
Color Depth
1-bit (Monochrome), 4-bit (16 colors), 8-bit (256 colors), 24-bit (True Color)
Metadata
None
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: image/pcxapplication/pcxapplication/x-pcx

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
0A (followed by version, e.g., 0A 05 01 08)
ASCII: \x0A
HTTP Headers
Content-Type: image/x-pcx
Content-Type: image/pcx
HTML Accept Attribute
accept="image/x-pcx, .pcx"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Incredibly simple RLE algorithm makes it very fast to decode, which was historically vital for early 3D video game engines
  • Retains crisp, lossless pixel data suitable for pixel art and interface assets
  • Well-documented and highly supported by older desktop publishing and image editing software
Limitations
  • Extremely inefficient compression by modern standards, producing large file sizes compared to PNG
  • Lacks modern imaging features such as alpha channel transparency, EXIF metadata, and color profiles
  • Zero support in web browsers; must be converted to PNG for web use

Developer Code Snippets

import magic
# Libmagic can easily detect the ZSoft PCX header
print(magic.from_file('graphic.pcx', mime=True)) # Outputs 'image/x-pcx' or 'image/pcx'
const fs = require('fs');
// Manually detecting the ZSoft PCX magic header
const buffer = Buffer.alloc(4);
const fd = fs.openSync('graphic.pcx', 'r');
fs.readSync(fd, buffer, 0, 4, 0);
fs.closeSync(fd);
// Check Manufacturer (0x0A), valid version (0-5), and encoding (0x01)
const isPCX = buffer[0] === 0x0A && buffer[1] <= 5 && buffer[2] === 0x01;
console.log('Is ZSoft PCX:', isPCX);
import (
    "bytes"
    "net/http"
)
// Native Go HTTP detection does not recognize PCX.
// You must explicitly check the first few bytes:
// isPCX := len(buf) >= 4 && buf[0] == 0x0A && buf[1] <= 0x05 && buf[2] == 0x01
$mime = mime_content_type('graphic.pcx');
echo $mime; // Standard PHP setups will return 'image/x-pcx' or 'image/pcx' depending on the system magic database

File Detection Steps

How to programmatically detect a image/x-pcx file by reading its raw bytes:

  1. 1 PCX files have a fixed 128-byte header.
  2. 2 Check the first byte (Offset 0). It must always be 0x0A (10), representing ZSoft as the manufacturer.
  3. 3 The second byte (Offset 1) indicates the version (0, 2, 3, 4, or 5).
  4. 4 The third byte (Offset 2) is the encoding method, which is almost universally 0x01 for RLE.
  5. 5 The fourth byte (Offset 3) represents the bits per pixel per plane (1, 2, 4, or 8).

Software Support

A
Adobe Photoshop
GIMP GIMP
ImageMagick ImageMagick
I
IrfanView / XnView

Conversion Tools

Share & Embed

Markdown Badge
PCX Format Badge
[![PCX Format](https://freewebptojpg.com/mime/image/pcx/badge.svg)](https://freewebptojpg.com/mime/image/pcx)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/pcx/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="PCX Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/pcx.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is a PCX file?

A PCX file is a legacy raster image format created by ZSoft for its PC Paintbrush program. It was one of the most common image formats on DOS and early Windows systems before JPEG and PNG became standard.

Why did so many classic PC games use PCX files?

PCX files use a very simple Run-Length Encoding (RLE) compression method. In the early 1990s, when CPU cycles and memory were heavily constrained, game engines (like the Doom engine) could decompress and load PCX images incredibly fast compared to more complex formats.

How do I open a PCX file today?

Modern web browsers do not support PCX. To view or edit them, you must use image editing software like Adobe Photoshop, GIMP, or classic image viewers like IrfanView and XnView.

Related Formats

Share this format