{"id":"image-x-dcraw","mimeType":"image/x-dcraw","name":"Digital Camera Raw (Generic Linux MIME)","shortName":"Generic-RAW","category":"Photography \u0026 Raw Imaging","extensions":[".raw"],"description":"The image/x-dcraw MIME type is a generic, 'super-class' alias established by the freedesktop.org shared-mime-info specification to broadly represent digital camera raw image files. It is named after `dcraw`, the legendary open-source ANSI C program written by Dave Coffin that pioneered open decoding for dozens of proprietary raw formats. Today, this MIME type is used primarily by Linux desktop environments (like GNOME and KDE) and server applications (like Nextcloud) as a fallback identifier for unrecognized raw sensor data before it can be mapped to a specific vendor's MIME type (e.g., image/x-canon-cr2 or image/x-nikon-nef).","seo":{"title":"image/x-dcraw MIME Type | Developer Reference for Generic RAW","description":"Complete reference for the image/x-dcraw MIME type: freedesktop.org shared-mime-info, generic RAW image files, Dave Coffin's dcraw, and Linux thumbnails.","faqs":[{"question":"What is an image/x-dcraw file?","answer":"It is not a specific file format. Rather, image/x-dcraw is a generic MIME type used primarily by Linux operating systems to classify dozens of different digital camera raw formats (like CR2, NEF, ARW, and DNG) under one umbrella category."},{"question":"What does 'dcraw' stand for?","answer":"dcraw (Dave Coffin's raw) is an open-source command-line tool written in ANSI C that became the foundation for almost all open-source raw image decoders (including LibRaw, UFRaw, and Darktable). The Linux community adopted its name to represent the entire category of files it could process."},{"question":"Why does my Nextcloud server show image/x-dcraw instead of image/tiff?","answer":"Many raw formats (and some standard TIFFs) share the same underlying TIFF byte structure. Automated file sniffers relying on the freedesktop.org database often use image/x-dcraw as a fallback for any complex TIFF-like file that appears to contain raw camera sensor data."}]},"index":{"compression":["Lossless","Uncompressed"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Linux Desktop File Associations (GNOME/KDE)","Thumbnail Generation for Raw Images (UFRaw/LibRaw)","Server-side Image Processing Fallbacks"]},"technical":{"magicBytes":{"hex":"Varies by vendor format","ascii":"None"},"container":"Varies (Predominantly TIFF/EP)","compressionAlgorithm":["Varies (Often Lossless JPEG ITU-T81 or uncompressed)"],"colorDepth":["12-bit","14-bit","16-bit"],"transparency":false,"animation":false,"metadata":{"exif":true,"xmp":true,"iccProfile":true},"alphaChannel":false,"progressiveLoading":false,"hdrSupport":true},"history":{"developer":"freedesktop.org (MIME mapping) / Dave Coffin (dcraw tool)","released":"1997","specification":"xdg/shared-mime-info"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"dcraw / LibRaw","logo":""},{"name":"Darktable","logo":""},{"name":"RawTherapee","logo":""},{"name":"GNOME / KDE File Managers","logo":""}],"conversion":{"convertTo":["jpeg","png","tiff","dng"],"convertFrom":[]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/x-dcraw"}],"htmlAccept":"None","fileDetection":["This MIME type does not have its own specific magic byte signature, as it acts as an umbrella class.","In the freedesktop.org shared-mime-info XML database, image/x-dcraw is configured as a super-class (often subclassing image/tiff). Individual formats like image/x-canon-cr2 or image/x-nikon-nef are then subclassed beneath it.","If a sniffer identifies raw sensor data but cannot match the specific proprietary camera vendor tag, it will gracefully fall back to returning image/x-dcraw."]},"prosCons":{"pros":["Provides a unified, highly useful catch-all MIME type for application developers who just need to know if a file is a raw image, rather than tracking 50+ individual camera extensions","Deeply integrated into the Linux desktop ecosystem, ensuring file manager thumbnails work seamlessly via tools like ufraw-thumbnailer"],"cons":["Not an official IANA standard","Can cause conflicts where standard TIFF files are misidentified as raw camera data by over-aggressive MIME sniffers","The underlying 'dcraw' tool was abandoned by its creator in 2018 (though its successor, LibRaw, continues to maintain the ecosystem)"]},"specifications":{"url":"https://gitlab.freedesktop.org/xdg/shared-mime-info","rfc":"","mimeAliases":["image/raw"]},"developerSnippets":{"python":"import mimetypes\n# On Linux systems utilizing the shared-mime-info database, querying a generic raw extension may return this type.\nprint(mimetypes.guess_type('photo.raw')[0]) # May output 'image/x-dcraw'","nodejs":"const mime = require('mime');\n// Many JS MIME libraries do not map x-dcraw by default as it is Linux-specific, but it can be manually registered.\nmime.define({'image/x-dcraw': ['raw']});\nconsole.log(mime.getType('photo.raw'));","go":"import (\n    \"net/http\"\n    \"os\"\n)\n// Go's native http.DetectContentType will not return image/x-dcraw. It will likely resolve underlying TIFF headers to 'image/tiff'.","php":"$mime = mime_content_type('photo.raw');\necho $mime; // On Debian/Ubuntu servers, the fileinfo extension using system magic databases will frequently output 'image/x-dcraw' for unrecognized RAWs."},"relatedFormats":["x-adobe-dng","x-canon-cr2","x-nikon-nef","tiff"]}
