{"id":"image-vnd-radiance","mimeType":"image/vnd.radiance","name":"Radiance HDR","shortName":"Radiance","category":"3D Graphics \u0026 HDR Imaging","extensions":[".hdr",".pic",".rgbe",".xyze"],"description":"The image/vnd.radiance MIME type represents the Radiance HDR image format, invented by Greg Ward in 1989 for the Radiance lighting simulation system. It is one of the earliest and most universally supported High Dynamic Range (HDR) image formats. To store a massive range of luminosity values without the memory overhead of true 32-bit floating-point per channel, it uses the ingenious RGBE (Red, Green, Blue, Exponent) encoding system, packing HDR data into just 32 bits per pixel. Today, it remains the industry standard for 3D environment maps and image-based lighting (IBL) in CGI and game engines.","seo":{"title":"image/vnd.radiance MIME Type | Developer Reference for Radiance HDR","description":"Complete reference for the image/vnd.radiance MIME type: Radiance HDR (.hdr) format, RGBE encoding, 3D environment mapping, and image-based lighting.","faqs":[{"question":"What is a Radiance HDR file?","answer":"A Radiance HDR (often just called an .hdr file) is a high-dynamic-range image format that captures the true luminosity of a scene, far beyond what standard monitors can display. It is predominantly used in 3D rendering to accurately illuminate digital environments using real-world lighting data."},{"question":"What is RGBE encoding?","answer":"RGBE stands for Red, Green, Blue, and Exponent. Instead of storing 32-bit floating-point numbers for every single color channel (which creates massive files), Radiance stores 8 bits for Red, Green, and Blue, plus a shared 8-bit multiplier (the Exponent). This clever trick allows it to represent incredibly bright light sources (like the sun) in just 32 bits per pixel."},{"question":"Can web browsers display image/vnd.radiance files natively?","answer":"No. Web browsers cannot natively render .hdr files. In web-based 3D applications (like Three.js or Babylon.js), the .hdr file is typically loaded via JavaScript, parsed into a Float32Array, and uploaded to the GPU as an environment map for WebGL rendering."}]},"index":{"compression":["Run-Length Encoding (RLE)","Uncompressed"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Image-Based Lighting (IBL)","3D Environment Maps (HDRI Skydomes)","Lighting Simulation","VFX and CGI Rendering"]},"technical":{"magicBytes":{"hex":"23 3F 52 41 44 49 41 4E 43 45","ascii":"#?RADIANCE"},"container":"Radiance Information Header","compressionAlgorithm":["Adaptive Run-Length Encoding (RLE)"],"colorDepth":["32-bit (8-bit per channel RGB + 8-bit shared Exponent)"],"transparency":false,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":false},"alphaChannel":false,"progressiveLoading":false,"hdrSupport":true},"history":{"developer":"Greg Ward (Lawrence Berkeley National Laboratory)","released":"1989","specification":"Radiance File Format Specification"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"Blender","logo":""},{"name":"Unreal Engine / Unity","logo":""},{"name":"Adobe Photoshop","logo":""},{"name":"ImageMagick","logo":"image-magic.webp"}],"conversion":{"convertTo":["exr","png","jpeg","tiff"],"convertFrom":["exr","tiff (32-bit)"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/vnd.radiance"}],"htmlAccept":"image/vnd.radiance, .hdr, .rgbe","fileDetection":["Check the first bytes of the file for the magic string '#?RADIANCE' (Hex: 23 3F 52 41 44 49 41 4E 43 45) followed by a newline.","Some older or alternative implementations may start simply with '#?' followed by an arbitrary program name (like '#?RGBE').","The header is plain ASCII text until a blank line, after which the binary pixel data begins."]},"prosCons":{"pros":["Universally supported by almost every 3D modeling software, renderer, and game engine in existence","RGBE encoding offers a brilliant balance between High Dynamic Range capability and small file size (compared to 32-bit float OpenEXR)","Simple, easy-to-parse ASCII header followed by straightforward RLE binary data"],"cons":["Does not support alpha transparency (no way to store an isolated light source with a transparent background)","The shared exponent architecture can occasionally introduce banding or color artifacts in extreme edge cases compared to true 16-bit/32-bit floating-point formats like OpenEXR","Zero native browser support for 2D viewing"]},"specifications":{"url":"https://floyd.lbl.gov/radiance/refer/filefmts.pdf","rfc":"","mimeAliases":["image/hdr","image/x-hdr","application/octet-stream"]},"developerSnippets":{"python":"import magic\n# Libmagic accurately detects the '#?RADIANCE' header\nprint(magic.from_file('environment.hdr', mime=True)) # May output 'image/vnd.radiance' or 'image/x-hdr'","nodejs":"const fs = require('fs');\n// Detecting the Radiance header manually\nconst buffer = Buffer.alloc(10);\nconst fd = fs.openSync('environment.hdr', 'r');\nfs.readSync(fd, buffer, 0, 10, 0);\nfs.closeSync(fd);\nconst isRadiance = buffer.toString('ascii') === '#?RADIANCE';\nconsole.log('Is Radiance HDR:', isRadiance);","go":"import (\n    \"bytes\"\n    \"net/http\"\n)\n// http.DetectContentType will not recognize Radiance HDR natively. Use a custom prefix check:\n// isHDR := bytes.HasPrefix(buf, []byte(\"#?RADIANCE\")) || bytes.HasPrefix(buf, []byte(\"#?\"))","php":"$mime = mime_content_type('environment.hdr');\necho $mime; // Depending on the magic database, this often resolves to 'image/vnd.radiance' or 'application/octet-stream'"},"relatedFormats":["exr","tiff","dds"]}
