Skip to content

ZSOFT Paintbrush file magic bytes (.pcx)

.pcx file signature: 0A | image/vnd.zbrush.pcx

Category: Images

The ZSoft Paintbrush file format (PCX) is a raster image format created by ZSoft Corporation for the PC Paintbrush program. It was used for storing and exchanging bitmap graphics in early DOS and Windows applications, including scanned images, screenshots, and simple illustrations. PCX is now largely a legacy format, and while it is generally safe, some modern software may have limited support for its older variants.

Safe

Magic Bytes

Offset 0
0A

Sources: Apache Tika

All Known Signatures

2 signature variants are documented for .pcx files across multiple sources.

Hex Signature Offset Sources
0A 0 Apache Tika
0A 01 0 Gary Kessler

Validation Code

How to validate .pcx files in Python

Python
def is_pcx(file_path: str) -> bool:
    """Check if file is a valid PCX by magic bytes."""
    signature = bytes([0x0A])
    with open(file_path, "rb") as f:
        return f.read(1) == signature

How to validate .pcx files in Node.js

Node.js
function isPCX(buffer: Buffer): boolean {
  const signature = Buffer.from([0x0A]);
  return buffer.subarray(0, 1).equals(signature);
}

How to validate .pcx files in Go

Go
func IsPCX(data []byte) bool {
    signature := []byte{0x0A}
    if len(data) < 1 {
        return false
    }
    return bytes.Equal(data[:1], signature)
}

API Endpoint

GET /api/v1/pcx
curl https://filesignature.org/api/v1/pcx

See the full API documentation for all endpoints and parameters.

Related Formats

Frequently Asked Questions

What is a .pcx file?

A .pcx file is a ZSOFT Paintbrush file. The ZSoft Paintbrush file format (PCX) is a raster image format created by ZSoft Corporation for the PC Paintbrush program. It was used for storing and exchanging bitmap graphics in early DOS and Windows applications, including scanned images, screenshots, and simple illustrations. PCX is now largely a legacy format, and while it is generally safe, some modern software may have limited support for its older variants.

What are the magic bytes for .pcx files?

The magic bytes for ZSOFT Paintbrush file (.pcx) files are 0A at byte offset 0. These bytes identify the file format more reliably than the extension alone.

How do I validate a .pcx file?

To validate a .pcx file, read the first bytes of the file and compare them against the known magic bytes (0A) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .pcx files?

The primary MIME type for .pcx files is image/vnd.zbrush.pcx.

Is it safe to open .pcx files?

ZSOFT Paintbrush file (.pcx) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.