[Haskell-cafe] Looking to check on some capabilities of Data.Colour

roconnor at theorem.ca roconnor at theorem.ca
Thu Aug 6 15:46:03 EDT 2009


On Thu, 6 Aug 2009, Jeff Heard wrote:

> I was wondering if Data.Colour supported Double-valued colour
> components > 1.0 or less than 0.  I'm looking to create an HDR image
> processing library, and Haskell has one of the most extensive and
> correct colour models around, thanks to Russell.  With 16bpcc or
> 32bpcc images, however, I need to be sure to be able to correctly
> calculate colour values that fall outside the usual [0.0,1.0] gamut.
> Does Data.Colour support this functionality?

Data.Colour supports values outside the range [0,1] for most computations. 
Components are clamped when extracting to Bounded component types such as 
Word8 (see toSRGBBounded).  There may also some issues with negaive values 
when converting to non-linear coordinate systems via a transfer function. 
This is an area I haven't thought to much about, so there could be a few 
"bugs" lurking here.  If found they should be fixed, assuming "right" 
behaviour can be found.

>
> -- Jeff
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

-- 
Russell O'Connor                                      <http://r6.ca/>
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''


More information about the Haskell-Cafe mailing list