On Sat, 3 Aug 2013, Alan Curry wrote:
If the formula itself is bad, where's the correct one? What formula would you use to display an image in a viewer that is dependent on libjpeg for all of its information about the image, in the case that libjpeg produces CMYK output?
By definition, there is no one correct formula. The approach which works is to attach an ICC color profile to the JPEG which describes its colorspace. Then the viewer uses an ICC color profile describing its own colorspace to transform from the origin colorspace to the viewing colorspace. These transforms may be accomplished via the MIT/X11-licensed lcms library.
If the colorspace enumeration is for a colorspace which has a precise definition (e.g. sRGB), then that can be used to select a locally-stored ICC profile (or hard-coded transform) so that the client can view it correctly.
Bob -- Bob Friesenhahn bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org