2005.05.26 13:03 "Re: Re: [Tiff] How to Write a tif file with compression =COMPRESSION_JPEG & photometric = PHOTOMETRIC_YCBCR ?", by Joris Van Damme
with bitcount=24 image, i did like this..
but with grayscale image(bitcount= 8)
If you want the widest standard for your jpeg stream, compress as RGB/YCBCR 24 bits is better. Tiff allows a one component photometric minisblack ( with a unknown colorspace for jpeg stream ).
I've seen JPEG-in-TIFF, with Photometric indicating YCbCr, and SamplesPerPixel=1. The JPEG data, in this case, had a single channel, as expected. The results when interpreting this channel as the Y component of YCbCr were fine.
I've also seen TIFFs with Photometric indicating L*a*b*, and SamplesPerPixel=1. The single channel, interpreted as the L* component of L*a*b*, made perfect sense, visually.
In my humble opinion, if a multichannel colorspace start with a brightness channel, and the SamplesPerPixel value equals 1, that is a unambigious situation, and may be preferable over storing grayscale as full YCbCr.
Using MinIsBlack or MinIsWhite photometrics, and JPEG-compressed single-channel data, may indeed also be an option...
Jpeg compression of palette color indexes would be as strange idea as jpeg compression of CIELAB. And it is out of spec.
As to the jpeg compression of palette color data, I totally agree. JPEG is a compression method that is designed for photographic images, 'continuous-tone images', where, statistically speaking, neighbouring pixels have very similar colors. There should be some criminal punishment for people using JPEG compression on screenshots and the like...
However, I've seen jpeg compression of CIE L*a*b*, and to me that *does* make perfect sense. L*a*b* is a colorspace with a brightness channel and two chroma channels, just like YCbCr. But there's good reason to assume L*a*b* is more perceptually uniform compared to YCbCr, so that actually makes it technically *more* suitable to be used as input for the JPEG compression algorithm... There is also ITULAB, a color-fax oriented standard for encoding L*a*b* in JPEG (and in JPEG-in-TIFF).
Joris Van Damme
Download your free TIFF tag viewer for windows here: