AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.12.17 21:47 "CMYK JPEG's", by Dominic Smith
2002.12.18 03:14 "Re: CMYK JPEG's", by Leonard Rosenthol
2002.12.18 21:55 "Re: CMYK JPEG's", by Dominic Smith
2002.12.18 19:48 "64-bit tiff", by Tony Lill
2002.12.19 19:54 "RE: CMYK JPEG's", by Frank Palmieri

2002.12.18 03:14 "Re: CMYK JPEG's", by Leonard Rosenthol

<x-flowed>At 9:47 PM +0000 12/17/02, Dominic Smith wrote:

I have some CMYK JPEG (.jpg, not TIFF JPEG) files which open ok in several recent PC packages (Paintshop 7 etc). But when I read them with libjpeg they are negative.

They are most likely created by Adobe software, which writes out "inverted" CMYK JPEGs. This problem is described in quite a lot of detail in the libjpeg and Ghostscript documentation - check them out!

I read that JPEG doesn't define the polarity of CMYK data, and that both interpretations (black is zero and white is zero) exist in the wild. Does libjpeg use white is zero?

Everybody except Adobe uses "white is zero"...

Also, has black is zero become the de facto (de Adobe?) standard? Should I invert the libjpeg output as a matter of course, and will this cover most/virtually all images I am likely to meet?

No, you need to actually check to see if the data comes from an Adobe application (presence of the Adobe APP1 tag) and then switch. HOWEVER, even that isn't 100% since there are some tools that will manipulate the data and leave the tags in place even if they aren't valid anymore :(.

Leonard
--
---------------------------------------------------------------------------
Leonard Rosenthol <mailto:leonardr@lazerware.com>
                                             <http://www.lazerware.com>

To subscribe or unsubscribe email tiff-request@olympiakos.com with subscribe
or unsubscribe in the email body. Libtiff home page: http://www.libtiff.org
</x-flowed>