{"id":"image-x-fuji-raf","mimeType":"image/x-fuji-raf","name":"Fujifilm RAW Image","shortName":"Fuji-RAF","category":"Photography \u0026 Raw Imaging","extensions":[".raf"],"description":"The image/x-fuji-raf MIME type represents the Fujifilm RAW (RAF) image format, a proprietary raw sensor data file generated by Fujifilm digital cameras (such as the X-Series and GFX medium format series). Unlike most digital cameras that use a standard Bayer color filter array, many Fujifilm cameras utilize their proprietary X-Trans sensor technology. Because the X-Trans layout is highly complex to reduce moiré without an optical low-pass filter, RAF files require specialized demosaicing algorithms during post-production. The format stores minimally processed 14-bit or 16-bit sensor data, comprehensive EXIF metadata, Film Simulation parameters, and an embedded high-resolution JPEG preview.","seo":{"title":"image/x-fuji-raf MIME Type | Developer Reference for Fujifilm RAF","description":"Complete reference for the image/x-fuji-raf MIME type: Fujifilm RAF raw image format, X-Trans sensor demosaicing, magic bytes, and raw photography.","faqs":[{"question":"What is a Fujifilm RAF file?","answer":"A RAF file is the proprietary raw image format used by Fujifilm digital cameras. It contains uncompressed or losslessly compressed raw pixel data straight from the camera's sensor, capturing maximum dynamic range and color depth."},{"question":"Why do RAF files from Fujifilm cameras look different in some editors?","answer":"Many Fujifilm cameras use a unique 'X-Trans' color filter array instead of the standard Bayer pattern. Decoding (demosaicing) an X-Trans sensor requires specialized mathematical algorithms. Different software (like Adobe Lightroom vs. Capture One vs. Iridient Developer) uses different algorithms, leading to slight variations in sharpness and micro-contrast."},{"question":"Can I view RAF files in a web browser?","answer":"No. Raw files like RAF are essentially raw sensor dumps and require complex processing to become viewable RGB images. To display them on the web, you must export them to standard formats like JPEG, WebP, or AVIF."}]},"index":{"compression":["Uncompressed","Lossless Compressed","Lossy Compressed (Modern firmware)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Professional Digital Photography","Fujifilm X-Trans Sensor Image Archival","High Dynamic Range (HDR) Post-Processing"]},"technical":{"magicBytes":{"hex":"46 55 4A 49 46 49 4C 4D 43 43 44 2D 52 41 57 20","ascii":"FUJIFILMCCD-RAW "},"container":"Proprietary RAF Container","compressionAlgorithm":["None","Proprietary Lossless","Proprietary Lossy"],"colorDepth":["14-bit (Per Channel - X-Series)","16-bit (Per Channel - GFX Series)"],"transparency":false,"animation":false,"metadata":{"exif":true,"xmp":true,"iccProfile":true},"alphaChannel":false,"progressiveLoading":false,"hdrSupport":true},"history":{"developer":"Fujifilm Corporation","released":"2000","specification":"Proprietary (Reverse-engineered by open-source community/LibRaw)"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"Capture One Pro","logo":""},{"name":"Adobe Lightroom Classic / CC","logo":""},{"name":"Fujifilm X RAW STUDIO","logo":""},{"name":"RawTherapee","logo":""}],"conversion":{"convertTo":["dng","jpeg","tiff","png"],"convertFrom":[]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/x-fuji-raf"}],"htmlAccept":"image/x-fuji-raf, .raf","fileDetection":["Fujifilm RAF files have a very distinct and explicit 16-byte magic string.","Check the first 16 bytes for the ASCII string 'FUJIFILMCCD-RAW ' (Hex: 46 55 4A 49 46 49 4C 4D 43 43 44 2D 52 41 57 20).","Immediately following this string is typically a 4-byte version number string (e.g., '0100' or '0200')."]},"prosCons":{"pros":["Retains absolute maximum sensor data, enabling massive shadow recovery and highlight protection compared to compressed in-camera JPEGs","Stores proprietary Fujifilm Film Simulation metadata (like Classic Chrome or Acros), allowing editors to perfectly replicate in-camera aesthetics","Very distinct and reliable magic header makes programmatic file detection foolproof"],"cons":["Proprietary format requires continuous updates to third-party software (like Lightroom) whenever Fujifilm releases a new camera","The X-Trans sensor matrix requires highly specialized demosaicing algorithms that are extremely computationally expensive, leading to slower import and rendering times","Completely unsupported in standard web browsers and basic operating system image viewers"]},"specifications":{"url":"https://www.libraw.org/","rfc":"","mimeAliases":["image/raf"]},"developerSnippets":{"python":"import magic\n# Libmagic will reliably detect the 'FUJIFILMCCD-RAW' signature\nprint(magic.from_file('photo.raf', mime=True)) # Outputs 'image/x-fuji-raf'","nodejs":"const fs = require('fs');\n// Manually detecting the 16-byte Fuji RAF magic signature\nconst buffer = Buffer.alloc(16);\nconst fd = fs.openSync('photo.raf', 'r');\nfs.readSync(fd, buffer, 0, 16, 0);\nfs.closeSync(fd);\nconst signature = buffer.toString('ascii');\nconst isRAF = signature === 'FUJIFILMCCD-RAW ';\nconsole.log('Is Fujifilm RAF:', isRAF);","go":"import (\n    \"bytes\"\n    \"net/http\"\n)\n// Native Go HTTP detection might return application/octet-stream.\n// Check directly for the explicit 16-byte signature:\n// isRAF := bytes.HasPrefix(buf, []byte(\"FUJIFILMCCD-RAW \"))","php":"$mime = mime_content_type('photo.raf');\necho $mime; // Standard PHP setups with updated magic definitions will return 'image/x-fuji-raf'"},"relatedFormats":["dng","jpeg","tiff"]}
