RGBE File Format

What is it?

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

Why is it?

Its biggest advantage is that it allows to have pixels to have the extended range and precision of floating point values. Often when we generate images from light simulations, the range of pixels values is much greater than will nicely fit into the standard 0 to 255 range of standard 24-bit image formats. As a result we either truncate bright pixels to 255 or we end up losing all our precision in dimmer pixels. By using a shared exponent, the rgbe format gains some of the advantages floating point values without the 12 bytes per pixel needed for single precision IEEE values. It can handle very bright pixels without loss of precision for darker ones.

Is there code to read/write RGBE files?

Greg Ward provides code to handle RGBE files in his Radiance rendering system. However the RGBE format is very useful even if you are not using Radiance and deserves to become a standard format throughout the rendering community and beyond. To facilitate this, I have implemented a minimal set of routines to read and write RGBE files. This code is provided without any guarantees whatsoever, but please do send me a note if you find any bugs.

Where can I find more information?

See "Real Pixels" by Greg Ward in Graphics Gems II .

Back to my home page
Back to the Cornell Program of Computer Graphics