RGBE image format
|Internet media type||
|Magic number||23 3f 52 41 44 49 41 4e 43 45 0a|
|Type of format||lossless image format|
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.