AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1999.04.22 20:54 "JPEG'd TIFF problems on Mac", by Eric Shapiro
1999.04.23 02:24 "Re: JPEG'd TIFF problems on Mac", by Li Xiangfeng
1999.04.23 02:59 "Re: JPEG'd TIFF problems on Mac", by Eric Shapiro
1999.04.23 14:20 "Re: JPEG'd TIFF problems on Mac", by Eric Shapiro
1999.04.23 18:43 "Re: JPEG'd TIFF problems on Mac", by Tom Lane
1999.04.24 14:50 "Re: JPEG'd TIFF problems on Mac", by Eric Shapiro
1999.04.24 14:53 "Re: JPEG'd TIFF problems on Mac", by Tom Lane
1999.04.24 15:20 "Re: JPEG'd TIFF problems on Mac", by Eric Shapiro

1999.04.24 14:53 "Re: JPEG'd TIFF problems on Mac", by Tom Lane

One other issue that came up today is that I'm having trouble reading *some* JPEG'd TIFF files created by Adobe ImageReady 1.0. The files exported by ImageReady work fine if at "maximum" or "high" quality, but if they are at medium or low quality I get the following error from libtiff:

 "Improper JPEG sampling factors"

I can send you the file(s) if you like.

[ exchange of sample file ensues ]

Sigh. Adobe has screwed up, big-time.

The TIFF headers say:

        YCbCr Subsampling: 2, 2

which is fine and dandy. But what's in the compressed data is:

offset $369 SOF0 (Baseline) (length 17)
  sample precision 8 width 340, height 32 components 3
    id 1 horizontal sampling 1, vertical sampling 1, quantization table 0
    id 2 horizontal sampling 2, vertical sampling 2, quantization table 1
    id 3 horizontal sampling 2, vertical sampling 2, quantization table 1

which is precisely ass-backwards: component 1 should be marked with sampling factors 2, and components 2 and 3 with sampling factors 1 (compare any ordinary 2x2-sampled JFIF JPEG for an example). This SOF header describes a sampling arrangement wherein Cb and Cr have more samples than Y, which is simply silly --- and is forbidden in TIFF even if it weren't silly. My bet is that the actual data is in fact 2x2-sampled and the marker is just wrong.

The files made at "max" or "high" quality probably have all-ones sampling factors (if ImageReady's quality settings are like Photoshop's) so the bug is masked there. Also, I'm guessing that Adobe's own decoder ignores what's in the JPEG markers, so it doesn't notice the problem (also a bug IMHO).

Anyone know a contact for ImageReady? We need to complain, quickly and loudly, before the world becomes infested with these broken TIFFs.

                        regards, tom lane
                        organizer, Independent JPEG Group