views:

676

answers:

3

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.

+7  A: 

OpenEXR.

greyfade
+9  A: 

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.

John Ellinwood
OpenEXR looks perfect. Excellent Debian support too.
timday
+1  A: 

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.

dmckee