Float32 colorspace range
adrian at pagenet.plus.com
Mon Sep 12 00:17:50 CEST 2005
Bart Coppens wrote:
> For the float32 histogram I needed to know what the minimum and maximum values
> were for a single channel. I remembered reading something about those colors
> being in the 0.0 - 1.0 range, and that made it very easy to implement Views
> in the code. When I checked it with an openEXR image, the histogram looked
> fine to me.
> However, as I was playing around a bit today with openEXR images in
> histograms, I checked some actual values from an image. I got values back in
> the range -0.00001 (probably rounding error or so, so I'd still guess it
> starts at 0.0), to over 200.0, which is far over 1.0 The only reference I
> seem to find in the code is:
> #define FLOAT_MAX 1.0f //temp
> Which isn't really true it seems. Does anyone know the real range so that that
> can be fixed in the histogram code?
That FLOAT_MAX is bogus. Some of the code in the colour model is still
working like the integer one it was copied from. I'll fix that at some
As for the range, there are no limits other than the maximum/minimum
values that a float can hold. I think even negative values can't be
ruled out - the data may have been computer generated and I know graphic
artists sometimes make use of 'negative' light.
More information about the kimageshop