[cairo] _cairo_color_compute_shorts fails with FPU set to
otaylor at redhat.com
Wed Aug 30 13:01:54 PDT 2006
On Wed, 2006-08-30 at 14:38 -0400, James Cloos wrote:
> >>>>> "Owen" == Owen Taylor <otaylor at redhat.com> writes:
> Cloos> shouldn’t cairo (and anything else using floats for intensities,
> Cloos> for that matter) really target [0.0, 1.0)? And document that.
> Owen> So, how do you say "white"?
> 1.0 - ϵ is the definitive value, but:
> If the source data is integer, than just i/(1+i_max), ie 255/256.0,
> 65535/65536.0, something like B**i/B**WP for CINEON-like log data
> with a whitepoint < i_max, etc.
So, you think that for 5-bit color values, a value of 31 should end
up as 247 or 248 when converted to 8-bit color values with an
intermediate floating point value.
I think it's self evident:
* Input values of 31/255/65535 have to map to either 1.0 - epsilon
* 1.0 can't produce a user-visible effect different than 1.0 - epsilon
So you might as well say that the range of the component values for
standard SRGB color values is [0.0, 1.0].
More information about the cairo