Twinside / Juicy.Pixels

Haskell library to load & save pictures
BSD 3-Clause "New" or "Revised" License
238 stars 57 forks source link

Fix RGB to CMYK conversion #180

Closed lehins closed 4 years ago

lehins commented 4 years ago

The usual formula and current implementation of the conversion function forget about the fact that the CMYK channels are represented as a percentage [0..100%] (or as a ratio [0.0 .. 1.0] in case of floating point values), but the CMYK8 and CMYK16 pixels expect those value to be in [0..255] and [0..65535] ranges respectfully.

Fixes #179