2013.02.14 19:26 "[Tiff] TIFF support for 16 bit floats", by Richard Nolde
On 02/14/2013 10:00 AM, firstname.lastname@example.org wrote:
> 4. Re: 32 bit to 16bit conversion (Bob Friesenhahn)
> Message: 4
> Date: Thu, 14 Feb 2013 09:08:33 -0600 (CST)
> From: Bob Friesenhahn <email@example.com>
> Subject: Re: [Tiff] 32 bit to 16bit conversion
> To: james wells <firstname.lastname@example.org>
> Cc: "email@example.com" <firstname.lastname@example.org>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
It's a 32 bit float, a hightmap, and I need to convert it to a 16 bit float, so hopefully it's not as painful?
I'll take a look at ILM's half library when I get home, looks interesting, hopefully not too out of my league.
There are also C-language implementations of 16-bit 'Half' in GraphicsMagick and in littlecms (lcms). Both of these are offered under a liberal (MIT/X11) license.
OpenEXR is quite large and primarily written in C++ so using it just for Half support would be painful.
I'd be interesting in seeing a sample of the data. I have C routines to convert between 16, 24, and 32 bit floats that I'm hoping to update in the not-to-distant future and I'd like to compare results with my routines to whatever else you might find out there. I can also share them in their present form if you are interested. Bob can comment on the differences between the implementations. The ones in lcms are table based whereas mine are iterative. I have options to round out of domain values to the maximum supported by the desired bit depth or to treat them as errors. My plan is to eventually add these routines to tiffcrop so that you could use tiffcrop to do this for you in one step.