{"success":true,"data":{"ext":"cpt","name":"Corel Photopaint file","description":"Corel Photo-Paint (CPT) is a raster image file format developed and used by Corel Corporation for its Photo-Paint graphics software. It is used for storing edited bitmaps, layered compositions, masks, and other project data in CorelDRAW and related design workflows. The format is generally safe, but older CPT files may have limited support outside Corel applications and can lose features when converted.","mime":[],"risk_level":"Safe","signatures":[{"hex":"43 50 54 37 46 49 4C 45","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"43 50 54 46 49 4C 45","offset":0,"sources":[{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]}],"related":["clb","cmx","psp"],"usage":{"python":"def is_cpt(file_path: str) -> bool:\n    \"\"\"Check if file is a valid CPT by magic bytes.\"\"\"\n    signature = bytes([0x43, 0x50, 0x54, 0x37, 0x46, 0x49, 0x4C, 0x45])\n    with open(file_path, \"rb\") as f:\n        return f.read(8) == signature","node":"function isCPT(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x43, 0x50, 0x54, 0x37, 0x46, 0x49, 0x4C, 0x45]);\n  return buffer.subarray(0, 8).equals(signature);\n}","go":"func IsCPT(data []byte) bool {\n    signature := []byte{0x43, 0x50, 0x54, 0x37, 0x46, 0x49, 0x4C, 0x45}\n    if len(data) < 8 {\n        return false\n    }\n    return bytes.Equal(data[:8], signature)\n}"}}}