Radiance RGBE Image (.hdr)
Radiance StandardRadiance RGBE (HDR) is the foundational high dynamic range format developed for the Radiance synthetic imaging system, storing photometrically accurate luminance values using a shared 8-bit exponent.
Inspect & Metadata
Operating systems and file analyzers identify HDR files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify HDR files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
23 3F 52 41 44 49 41 4E 43 45 0AASCII REPRESENTATION: #?RADIANCE\n
Standardization: Radiance Synthetic Imaging System Standard
Technical Specifications
| Container Architecture | ASCII header ending with empty line followed by resolution string and binary RLE scanlines |
| Compression | Adaptive adaptive run-length encoding (RLE) applied per-channel scanline |
| Byte Endianness | Big-Endian / Network byte order |
| Color Spaces | Linear Rec.709 RGB with CIE chromaticity coordinates |
| Channels & Structure | RGBE: Red, Green, Blue (8-bit mantissas) + shared 8-bit Exponent |
| Max Dimensions | Practically unlimited (32-bit unsigned resolution strings) |
| Transparency | None (physical radiant luminance measurements) |
| Streaming & Progressive | Sequential scanline-by-scanline streaming playback |
Technical Comparison Matrix: HDR vs Competitors
| Technical Attribute | HDR (Current) | EXR | TIFF | JPEG |
|---|---|---|---|---|
| Pixel Encoding | 32-bit RGBE (shared 8-bit exponent) | 16-bit half / 32-bit float per channel | Integer 8/16-bit or 32-bit float | 8-bit gamma-encoded integer |
| Primary Use Case | 360-degree environment lighting (IBL) | VFX multi-pass compositing | Photography & prepress | Standard web graphics |
| Dynamic Range Scope | 76 orders of magnitude (10^-38 to 10^38) | Practically infinite float range | Varies by bit depth | Limited 8-bit SDR range |
| Channels Supported | RGB only | Unlimited arbitrary channels | Multiple arbitrary channels | RGB / CMYK |
Common Corruption Modes & Hex Recovery Guide
Image displays horizontal streak bands across the entire frame width.
Root Cause: Corrupted run-length count byte in scanline RLE decompression.
Recovery: Reconstruct damaged scanline markers using File2File HDR Repair or convert to EXR.
Security Analysis & Parser Attack Vectors
Radiance HDR decoders often parse ASCII header lines using unbounded string routines that can trigger stack buffer overflows.
Known Attack Vectors
- Unbounded sprintf/sscanf calls when reading resolution string headers ('-Y %d +X %d').
- Heap out-of-bounds write during malformed RLE scanline decoding.
- Integer overflow when allocating destination 32-bit floating point buffers.
Defensive Best Practices: Validate ASCII header length and scanline dimensions before allocating image buffers.
Historical Origins & Milestones
Key Advantages & Pros
- Compact 32-bit per pixel memory footprint while spanning 76 orders of magnitude of physical light luminance.
- Universal support across 3D rendering packages (Blender, Unreal Engine, Unity, Cinema 4D) for 360-degree environment maps.
- Simple, robust file structure easily implemented across all software platforms.
Technical Limitations & Cons
- Quantization banding can occur in extreme dark regions due to shared 8-bit exponent encoding.
- RGB channels cannot store negative numbers or arbitrary multi-pass layers.
- Largely superseded by OpenEXR for multi-pass visual effects production.
Interesting Technical Trivia
- Every Radiance HDR file starts with the text header '#?RADIANCE' or '#?RGBE'.
- The format was created to simulate physical architectural lighting in building design before structures were built.
- Paul Debevec's iconic 1997 SIGGRAPH paper 'Recovering High Dynamic Range Radiance Maps from Photographs' used this format to revolutionize CGI lighting.
Frequently Asked Technical Questions
What is an HDRI file used for in 3D?
HDRI (.hdr) files are used as 360-degree panoramic environment maps to provide photorealistic real-world lighting, shadows, and reflections on 3D objects.
How does RGBE 32-bit encoding work?
Instead of storing three separate floating-point numbers, RGBE uses 8 bits each for red, green, and blue, plus a shared 8-bit exponent, fitting full HDR dynamic range into just 4 bytes per pixel.
Can I convert HDR to JPG?
Yes. File2File.app can tone-map and convert 32-bit Radiance HDR files into standard JPG or PNG images directly in your browser.