Bob Friesenhahn wrote: > 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. >
You lose me already at "attach an ICC color profile". How does the image viewer, relying on libjpeg to parse the file, find this attached information? The words "attach", "ICC", and "profile" do not appear in libjpeg.txt so I don't know how a client of the library is supposed to access this metadata. But I get the general outline: The function that maps input pixel values to RGB is defined by some metadata in the jpeg which I don't know how to find. Once I find it, I will pass it to liblcms for interpretation. -- Alan Curry -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org