Jump to content

RGBE image format

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Fmadd (talk | contribs) at 12:44, 3 May 2016 (→‎See also). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Radiance RGBE
Filename extension
.hdr
Internet media type
image/vnd.radiance
Magic number23 3f 52 41 44 49 41 4e 43 45 0a
Type of formatlossless image format
Websiteradsite.lbl.gov/radiance/refer/filefmts.pdf

RGBE is an image format invented by Gregory Ward Larson. It stores pixels as one byte each for RGB (red, green, and blue) values with a one byte shared exponent. Thus it stores four bytes per pixel.

RGBE's biggest advantage is that it allows pixels to have the extended range and precision of floating point values. Often when images are generated from light simulations, the range of pixels values is much greater than will nicely fit into the standard 0..255 range of standard 24-bit image formats. As a result, the bright pixels are either clipped to 255 or end up losing all their precision in dimmer pixels. By using a shared exponent, the RGBE format gains some of the advantages of floating point values without the 12 bytes per pixel needed for single precision IEEE floating-point values, or 6 bytes in half precision (and which would cover smaller range). It can handle very bright pixels without loss of precision for darker ones.

A second variant of the format uses the XYZ color model with a shared exponent. The mime type and file extension is identical, thus applications reading this file format need to interpret the embedded information on the color model.

Greg Ward provides code to handle RGBE files in his Radiance rendering system.

Similar formats

Some GPUs support a '7e3' format, where a 32bit word encodes 3 10bit floating point color channels, each with 7bits of mantissa and 3 bits of exponent.

See also