Radiance HDR

Radiance HDR is the original high dynamic range image format, written for Greg Ward's Radiance lighting simulation software in the mid-1980s — more than a decade before OpenEXR. It is still the common currency for environment maps and image-based lighting, which is where most .hdr files come from today.

Its trick is RGBE: three 8-bit mantissas share one 8-bit exponent, so a pixel costs four bytes yet spans a far greater range than 8-bit color. That is compact but coarse next to OpenEXR's per-channel floats — one exponent for all three channels means the two darker channels lose precision — which is why HDR persists for lighting and OpenEXR won for rendering.

Paintapp opens HDR files as scene-linear float documents, the same kind of document an OpenEXR file opens as, and writes them back out with their full range intact.

Capabilities

FeatureDetails
RGBE pixelsDecoded to 32-bit float per channel, in linear light
Scanline compressionBoth encodings: the old run-length format and the newer per-component one
Uncompressed scanlinesRead
PRIMARIES variableApplied: the document takes a color profile built from the file's own primaries and white point
EXPOSURE variableDivided back out, so the pixels are scene radiance again; cumulative across multiple lines, as the format specifies
XYZE files (FORMAT=32-bit_rle_xyze)Opened as CIE XYZ with the XYZ Profile assigned, the same way XYZ-native TIFFs are
Image orientationAll four resolution-line orderings honored, not just the usual -Y +X
File extensions.hdr, .rgbe, .xyze, recognized by content rather than by name
ExportRGBE, run-length encoded or uncompressed, with the picture's primaries written into the header

Limitations

LimitationResult
Export of layers or channelsNot supported; the format holds one flat image, so export writes the flattened picture. Use OpenEXR to keep layers
Export of transparencyNot supported; RGBE has no alpha channel
Export as XYZENot supported; export always writes RGBE
Samples above 1.69 × 1038Clipped on export: that is the largest value RGBE can state

Opening HDR Files

An HDR file is a single image — no layers, channels or views — so it opens as one layer in a float document that composites in linear light.

Color

Like OpenEXR, the format states its own gamut: a PRIMARIES header line carries the CIE coordinates of red, green and blue plus the white point. Opening builds a color profile from exactly those, with a linear tone response, and assigns it to the document.

When a file states no PRIMARIES, the format defines the default as Radiance's own standard set — which uses an equal-energy white, not the D65 of sRGB. Files are profiled that way rather than being assumed to be sRGB-like, which would shift their white.

An XYZE file (FORMAT=32-bit_rle_xyze) holds CIE X, Y, Z in the three channels rather than RGB. It opens as an RGB document with the XYZ Profile assigned, exactly as a LogLuv TIFF does — see Color Management.

Values above 1.0 survive editing, but the display conversion has no exposure or tone control of its own yet, so highlights well above white clip on screen. Environment maps, whose whole point is a sun thousands of times brighter than the sky, show this most.

Exposure

An EXPOSURE line records a multiplier that a Radiance tool already applied to the stored samples. Opening divides it back out, so what you edit is scene radiance rather than a scaled copy of it. The format makes this value cumulative — each tool in a chain may append its own line, and they multiply — and all of them are undone, not just the last.

Saving HDR Files

Export writes RGBE pixels in linear light, straight from the composite — the values are not squeezed into the 0–1 range a screen shows, so what comes back on reopening is what was there. One exponent is shared by red, green and blue, so a pixel keeps roughly two decimal digits per channel; OpenEXR keeps more.

Compress packs repeated pixels. It is the normal choice: every program that reads the format understands it, and the file is smaller. Turning it off writes each pixel as four plain bytes, which a few very old readers want.

There is no color setting, and that is deliberate. The format states its gamut as a PRIMARIES header line rather than as a color profile, and a file that leaves the line out does not mean “unspecified” — the format defines the absent line as Radiance’s own primaries, which are a different green from an ordinary picture’s. Saving therefore always writes the line, describing sRGB. Reopening the file lands back in the gamut it was saved from instead of drifting.

Specifications and References

Files to Open

Environment maps are the easiest HDR files to find, and the most useful to look at: their range is wide enough that the format's purpose is obvious.

See Also