AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

2001.08.18 04:19 "jpeg in tiff", by Joris Van Damme

Oh, BTW, I also know this problem is probably related to YCbCr downsampling. Taking test file is quad-jpeg, you all know that one... dumps like this

Image file header
Byte order: Motorola

Image file directory
Page index: 0
Offset in file: 23406
ImageWidth (short): 512
ImageLength (short): 384
BitsPerSample (3 shorts): 8, 8, 8

Compression (code in short): JPEG Technote #2 PhotometricInterpretation (code in short): YCbCr StripOffsets (24 longs): 8, 175, 342, 633, 2227, 3683, 5112, 6553,... SamplesPerPixel (short): 3

RowsPerStrip (short): 16
StripByteCounts (24 longs): 167, 167, 291, 1594, 1456, 1429,...
PlanarConfig (short): 1
XPosition (rational): 0
YPosition (rational): 0

JpegTables (574 undefineds): FFD8 FFDB  0043 0008  0606 0706  ...

ReferenceBlackWhite (6 rationals): 0, 255, 128, 255, 128, 255

This means that the YCbCrSubSampling tags are default: 2 and 2. I don't understand the consequences of this completely. Does libtiff request downsampled data from libjpeg? Can libjpeg return this data without converting? (My purpose is to get the data that needs the least converting.) LibTiff seems to need alloc_sarry from within a function alloc_downsampled_buffers. That seems to indicate that the problem I'm having is related to this. Any thoughts?

Joris