Question

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.

Was it helpful?

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.

  • The Pixel Image Editor for linux has EXR support for editing, too.

  • pfstools is also necessary if you're going to work with HDR on linux. Its a set of command line programs for reading, writing and manipulating HDR and has Qt and OpenGL viewers.

  • Theres also jpeg2exr for linux

  • Heres some other debian packages for OpenEXR viewers.

  • Based on this, it looks like theres also a Gimp plugin somewhere.

OTHER TIPS

It looks like the modern incarnation of FITS would fit your stated needs, but I would also suggest you consider using a 2D histogram structure from one of the good analysis packages in wide use by the physics community: ROOT or AIDA are the modern ones that I am familiar with.


NB: It's been more than a decade since I used FITS for anything, but I recall it begin a nice and flexible way to store fairly raw data.

For future reference, also rather widespread is the TIFF format. You can use the free and open-source LibTIFF for I/O.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top