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:49 "Re: [Tiff] creating JPEG file", by Bob Friesenhahn

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.

Actually, no. I wimped out and usually specify JPEGCOLORMODE_RGB when using JPEG compression. I am not sure that libtiff supports passing subsampled JPEG YCbCr data to and from the user properly. It is challenging since the number of bytes produced is not consistent across channels and varies based on the type of subsampling. There were certainly problems with 12-bit JPEG. Even if it does, doing the subsamping is painful. It is easier left to libtiff (which likely passes the burden on to libjpeg).

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/