An .hdr file is usually a Radiance HDR image, also called RGBE. Unlike a normal photo, which stores brightness as 0 to 255, it stores real light intensities. A sunlit sky can be thousands of times brighter than the shadow under a tree, and the file keeps both. Most people who download .hdr files today are 3D artists: HDRI environment maps, 360° panoramas of real places, light scenes in Blender, Unreal Engine, Unity and other renderers. Lighting designers and researchers use the format with Radiance, the simulation software it was created for.
Not every .hdr file is an image, though. Satellite data in ENVI format and medical scans in the Analyze 7.5 format also use .hdr for their header files. More on that below.
History
Greg Ward began writing Radiance at Lawrence Berkeley National Laboratory in 1985 and needed a picture format that could hold the physically correct values his renderer computed. The RGBE encoding he designed was described publicly in his article "Real Pixels" in Graphics Gems II (1991), and for many years it was the only widely used HDR image format. Radiance became open source in January 2002. The media type image/vnd.radiance was registered with IANA on 4 March 2009; that date is sometimes mistaken for the birth of the format, which is more than twenty years older.
How RGBE works
- A text header starts with
#?RADIANCE, followed by lines such asFORMAT=32-bit_rle_rgbeand optionallyEXPOSURE=, then an empty line and a resolution line like-Y 1024 +X 2048. - 32 bits per pixel: three 8-bit mantissas for red, green and blue plus one shared 8-bit exponent. This covers about 76 orders of magnitude in steps of roughly 1 %, in a quarter of the space of three 32-bit floats.
- The exponent belongs to the brightest channel. When one colour dominates strongly, the other two lose precision. For environment lighting this hardly matters.
- Run-length encoding, lossless and modest. An 8K equirectangular HDRI (8192 × 4096) easily exceeds 100 MB.
- Linear values, no gamma. A value of 1.0 has no fixed meaning as "white"; it is just a quantity of light.
- No alpha channel, no layers, almost no metadata. A variant called XYZE stores CIE XYZ instead of RGB under the same extension.
Visual effects work today mostly uses OpenEXR, which adds half-float precision, alpha and multiple layers. Radiance HDR stays popular for environment maps because nearly every 3D tool reads it.
How to open an .hdr file
- Photoshop opens Radiance files as 32-bit images; GIMP and Affinity Photo read them too.
- Blender: World properties → Color → Environment Texture, then pick the .hdr file. It lights the scene immediately.
- Radiance itself (free, Windows, macOS, Linux) includes the viewer
ximageand tools such aspfiltandpcondfor exposure and tone mapping. - The Photos app in Windows and most phone galleries do not open .hdr.
Common HDR problems
.hdr file won't open in any image program
Check the file size and the start of the file. If it is a small text file beginning with ENVI, it is the header of satellite or hyperspectral data stored next to a .dat, .img or .raw file; open the pair in QGIS or ENVI. A binary .hdr of 348 bytes with an .img file next to it is an Analyze 7.5 medical scan for programs like 3D Slicer. Neither is a picture, and our converter cannot convert them.
HDR to JPG looks burnt out or flat
JPG and PNG hold 8 bits of display-referred values, so HDR data has to be squeezed. Our converter does not tone-map: it converts the linear values to sRGB and clips everything brighter than 1.0 to white. That works for interiors and evenly lit scenes, not for a panorama with the sun in it. For a balanced preview use tone mapping, for example Photoshop's HDR Toning, Radiance pcond or the free Luminance HDR, and convert the result.
Is an HDR photo from my phone an .hdr file?
No. The HDR mode on phones merges several exposures and saves an ordinary HEIC or JPEG. For those, see HEIC to JPG.
Converting HDR
The usual direction is HDR to JPG or PNG for thumbnails and previews of environment maps, with the clipping described above. HDR to TIFF is useful for further editing. Converting to .hdr makes sense when a 3D tool requires the format, but it creates no extra dynamic range.
Radiance HDR at a glance
| Developer | Greg Ward, Lawrence Berkeley National Laboratory |
|---|---|
| Origin | Radiance, development from 1985; RGBE published 1991 |
| Specification | Radiance File Formats; media type image/vnd.radiance (2009) |
| Type | High dynamic range raster image |
| Encoding | RGBE or XYZE, 32 bits per pixel, RLE, lossless |
| Typical use | HDRI environment maps, lighting simulation |
References: Radiance project site, description of the RGBE format at LBNL and IANA registration of image/vnd.radiance.