{"id":"image-x-cmx","mimeType":"image/x-cmx","name":"Corel Metafile Exchange","shortName":"Corel-CMX","category":"Vector Graphics \u0026 Legacy","extensions":[".cmx"],"description":"The image/x-cmx MIME type represents the Corel Metafile Exchange (CMX) format, a proprietary vector graphics format developed by Corel Corporation. Introduced in the mid-1990s alongside the CorelDRAW suite, CMX was specifically designed to facilitate the easy exchange of vector graphics, clip art, and page layouts between different Corel applications and third-party software. Built on the RIFF (Resource Interchange File Format) container architecture, CMX stores scalable drawing commands rather than a pixel grid, maintaining high fidelity but remaining largely restricted to the Corel software ecosystem.","seo":{"title":"image/x-cmx MIME Type | Developer Reference for Corel CMX","description":"Complete reference for the image/x-cmx MIME type: Corel Metafile Exchange (CMX) format, RIFF container, CorelDRAW history, and vector interoperability.","faqs":[{"question":"What is a CMX file?","answer":"A CMX (Corel Metafile Exchange) file is a vector image format created by Corel. It was widely used in the 1990s and 2000s for distributing clip art collections (like Corel Mega Gallery) and sharing vector graphics between different design applications."},{"question":"What is the difference between CMX and CDR files?","answer":"CDR is the primary, complex working document format for CorelDRAW, supporting multi-page layouts and advanced program-specific features. CMX is a simplified, highly portable \"exchange\" format intended solely for storing single vector illustrations or clip art."},{"question":"Can Adobe Illustrator open Corel CMX files?","answer":"Adobe Illustrator's native support for CMX is notoriously unreliable and often fails on newer versions. It is highly recommended to open the file in CorelDRAW, Inkscape, or LibreOffice Draw, and then export it to a standard format like SVG, PDF, or EPS."}]},"index":{"compression":["Uncompressed Vector Commands","Embedded Raster Compression (Optional)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Legacy CorelDRAW Clip Art Collections","Vector Graphic Exchange within Corel Suite","Historical Desktop Publishing Assets"]},"technical":{"magicBytes":{"hex":"52 49 46 46 (skip 4) 43 4D 58 31","ascii":"RIFF....CMX1"},"container":"RIFF (Resource Interchange File Format)","compressionAlgorithm":["None (Vector)"],"colorDepth":["Vector Data","Supports embedded bitmaps"],"transparency":true,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":true},"alphaChannel":true,"progressiveLoading":false,"hdrSupport":false},"history":{"developer":"Corel Corporation","released":"Mid-1990s","specification":"Proprietary (Reverse-engineered by open-source community/libcdr)"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"CorelDRAW","logo":""},{"name":"Inkscape (via libcdr / UniConvertor)","logo":""},{"name":"LibreOffice Draw","logo":""},{"name":"XnView","logo":""}],"conversion":{"convertTo":["svg","eps","png"],"convertFrom":["cdr","wmf"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/x-cmx"},{"header":"Content-Type","value":"application/x-cmx"}],"htmlAccept":"image/x-cmx, .cmx","fileDetection":["Check the first 4 bytes for the RIFF ASCII signature (Hex: 52 49 46 46).","Skip the next 4 bytes (which dictate the total file size).","Check bytes 8-11 for the CMX specific signatures: 'CMX1', 'CMX2', or 'CMX3' (Hex: 43 4D 58 31, etc.)."]},"prosCons":{"pros":["Preserves rich vector attributes and layer groupings native to the Corel drawing engine better than standard WMF files","Significantly smaller footprint than full CDR project files, making it excellent for early CD-ROM clip art distribution","Maintains decent support in the open-source community thanks to libraries like libcdr"],"cons":["Proprietary format strictly tied to Corel's ecosystem, often causing compatibility issues with Adobe software","Zero support in web browsers; must be converted to SVG for modern web usage","Largely obsolete for modern workflows, superseded by PDF and SVG"]},"specifications":{"url":"https://wiki.documentfoundation.org/DLP/Libraries/libcdr","rfc":"","mimeAliases":["application/x-cmx","image/cmx"]},"developerSnippets":{"python":"import magic\n# Libmagic can usually detect the RIFF container and CMX signature\nprint(magic.from_file('clipart.cmx', mime=True)) # Outputs 'image/x-cmx' or 'image/cmx'\n\n# Manual RIFF header check:\nwith open('clipart.cmx', 'rb') as f:\n    header = f.read(12)\n    if len(header) \u003e= 12 and header[0:4] == b'RIFF' and header[8:11] == b'CMX':\n        print('Is Corel CMX: True')","nodejs":"const fs = require('fs');\n// Manually detecting the RIFF/CMX magic bytes\nconst buffer = Buffer.alloc(12);\nconst fd = fs.openSync('clipart.cmx', 'r');\nfs.readSync(fd, buffer, 0, 12, 0);\nfs.closeSync(fd);\nconst isRIFF = buffer.toString('ascii', 0, 4) === 'RIFF';\nconst isCMX = buffer.toString('ascii', 8, 11) === 'CMX';\nconsole.log('Is Corel CMX:', isRIFF \u0026\u0026 isCMX);","go":"import (\n    \"bytes\"\n    \"net/http\"\n)\n// Native Go HTTP detection will likely only see the generic RIFF header (often mapping to 'video/avi' or 'application/octet-stream').\n// You must explicitly check the bytes at offset 8.\n// isCMX := len(buf) \u003e 12 \u0026\u0026 bytes.Equal(buf[0:4], []byte(\"RIFF\")) \u0026\u0026 bytes.Equal(buf[8:11], []byte(\"CMX\"))","php":"$mime = mime_content_type('clipart.cmx');\necho $mime; // Standard PHP setups will often resolve this to generic 'application/octet-stream' without custom magic database rules."},"relatedFormats":["cdr","wmf","svg","eps"]}
