AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.09.08 19:13 "[Tiff] creating JPEG file", by Philip Watkinson
2005.09.08 20:07 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn
2005.09.08 21:00 "RE: [Tiff] creating JPEG file", by Philip Watkinson
2005.09.08 22:11 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.08 22:31 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn
2005.09.08 23:08 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.08 20:49 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.08 23:04 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn
2005.09.08 23:16 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.09 09:31 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.09 10:03 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.09 14:58 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn
2005.09.09 15:11 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn
2005.09.10 17:51 "Re: [Tiff] creating JPEG file", by Andrey Kiselev
2005.09.09 23:30 "Re: [Tiff] creating JPEG file", by Joris Van Damme
2005.09.09 23:49 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn
2005.09.10 00:06 "Re: [Tiff] creating JPEG file", by Joris Van Damme

2005.09.09 23:30 "Re: [Tiff] creating JPEG file", by Joris Van Damme

Bob,

GraphicsMagick is doing something a bit odd though since it uses

   (void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RGB);

The only other choice appears to be JPEGCOLORMODE_RAW. Maybe JPEGCOLORMODE_RAW should be used for CMYK?

As you know, I'm not much of a LibTiff expert. But here's my two cents anyway.

I think TIFFTAG_JPEGCOLORMODE is a so-called 'pseudo-tag'. That is, a tag that doesn't end up in the TIFF file, nor should end up in there, but simply serves the purpose of passing through optional settings and stuff to the compression codec. In this case, the compression codec is LibJpeg, and TIFFTAG_JPEGCOLORMODE signals whether you want LibJpeg to do converstion from/to RGB, or handle this the normal way (outside of the compression codec, that is).

So, what you want to use should depend on your encapsulating design. I would expect an extensive encapsulating app like yours takes care of all convertion from/to YCbCr and CMYK and all. It would have to, anyway, since these color modes can be used with any compression scheme, not just with JPEG compression. So... that's when I guess there's not ever any good need for JPEGCOLORMODE_RGB, and that it only serves the purpose of complicating things by making resulting/needed color spaces compression scheme dependently related to the color space specified in the Photometric tags and all... But obviously, I'm missing something, since I've made this point before and nobody seems to agree.

Like I said, I'm not much of a LibTiff expert. And whether this is related to LibTiff adding the YCbCrSubSampling tag or not, I couldn't even hope to guess. Sorry.

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html