c++graphicsrenderingfile-formathdrimages

Which floating-point image format should I use?


In the past I've saved RGB images (generated from physical simulations) as 8-bits/channel PPM or PNG or JPEG.

Now I want to preserve the dynamic range of the simulation output, which means saving a floating point image and then treating conversion to 8-bits/channel as a post-processing step (so I can tweak the conversion to 8-bit without running the lengthy simulation again).

Has a "standard" floating point image format emerged ?

Good free supporting libraries/viewers/manipulation tools, preferably available in Debian, would be a bonus.


Solution

  • Have you looked into Radiance RGBE (.hdr) and OpenEXR (.exr). RGBE has some source code here. NVIDIA and ATI both support EXR data in their graphics cards. There are source code and binaries from the OpenEXR download page. ILM created OpenEXR and it has wide support. OpenEXR has support for 16 and 32 bit floating point per channel, and is what most people use these days, unless they've written their own format.