Corel Photopaint file

application/octet-stream

Safe

Magic Bytes

Offset: 0
43 50 54 46 49 4C 45

Corel PHOTO-PAINT (CPT) is a proprietary raster graphics format developed and maintained by Corel Corporation as the native project file for its image editing software. Primarily used within the CorelDRAW Graphics Suite, it preserves multi-layered images, transparency masks, and specific color channels for complex image manipulation. Although the format is considered safe, its proprietary nature restricts compatibility to Corel products or specific third-party tools, necessitating conversion for standard web or print distribution.

Extension

.cpt

MIME Type

application/octet-stream

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .cpt files in Python

Python
def is_cpt(file_path: str) -> bool:
    """Check if file is a valid CPT by magic bytes."""
    signature = bytes([0x43, 0x50, 0x54, 0x46, 0x49, 0x4C, 0x45])
    with open(file_path, "rb") as f:
        return f.read(7) == signature

How to validate .cpt files in Node.js

Node.js
function isCPT(buffer: Buffer): boolean {
  const signature = Buffer.from([0x43, 0x50, 0x54, 0x46, 0x49, 0x4C, 0x45]);
  return buffer.subarray(0, 7).equals(signature);
}
Go
func IsCPT(data []byte) bool {
    signature := []byte{0x43, 0x50, 0x54, 0x46, 0x49, 0x4C, 0x45}
    if len(data) < 7 {
        return false
    }
    return bytes.Equal(data[:7], signature)
}

API Endpoint

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

Related Formats