2005.09.08 19:13 "[Tiff] creating JPEG file", by Philip Watkinson

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 Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/