AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2011

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2011.01.21 00:51 "Cannot read YCbCr JPEG-compressed images", by Craig Bruce
2011.01.21 12:11 "Re: Cannot read YCbCr JPEG-compressed images", by <jcupitt@gmail.com>
2011.01.23 03:30 "Re: Cannot read YCbCr JPEG-compressed images", by Charles Auer
2011.01.23 16:01 "Re: Cannot read YCbCr JPEG-compressed images", by Bob Friesenhahn
2011.01.25 01:02 "Re: Cannot read YCbCr JPEG-compressed images", by Craig Bruce
2011.01.25 02:00 "Re: Cannot read YCbCr JPEG-compressed images", by Olivier Paquet
2011.01.26 02:40 "Re: Cannot read YCbCr JPEG-compressed images", by Craig Bruce
2011.01.26 04:50 "Re: Cannot read YCbCr JPEG-compressed images", by Bob Friesenhahn

2011.01.25 02:00 "Re: Cannot read YCbCr JPEG-compressed images", by Olivier Paquet

On Mon, Jan 24, 2011 at 8:02 PM, Craig Bruce <csbruce@cubewerx.com> wrote:
> If I build it using the system libraries on my computer (Linux x86_64,
> Fedora 13, libtiff 3.9.4), it works:
>
> $ gcc tile.c -ltiff -ljpeg -lz -lm -o tile_test
> $ ./tile_test
> TIFFReadDirectory: Warning, Q09050_006_NIR.tif: unknown field with tag
> 50742 (0xc636) encountered.
> tileNum=0, tileSize=98304, buf=0x2124a60
> successful read, size=98304
>
> However, if I build and link with my own libtiff 4.0.0beta6 with the
> default configuration, I get the buffer error:
>
> $ gcc -I ~/tiff-4.0.0beta6/libtiff tile.c
> ~/tiff-4.0.0beta6/libtiff/.libs/libtiff.a -ljpeg -lz -lm -o tile_test
> $ ./tile_test
> TIFFReadDirectory: Warning, Unknown field with tag 50742 (0xc636)
> encountered.
> TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" does
> not end in null byte.
> TIFFFetchNormalTag: Warning, ASCII value for tag "Software" does not end
> in null byte.
> tileNum=0, tileSize=98304, buf=0x22092b0
> JPEGDecodeRaw: application buffer not large enough for all data..
> ERROR!

I tried both my system libtiff (3.9.4 too but on slackware) and the
CVS head of 4.0 and got a segfault in jpeg_read_raw_data. This seems
to be called from libtiff just after the code which generates the
error you got above so it's probably related.

> The behaviour is consistent across a couple different versions of Fedora-
> built and personally-build libtiffs.  Is there some special libtiff
> configuration needed to make YCbCr/JPEG reading work properly?  I need
> to use a custom-built libtiff.

I suspect the different results we're seeing between people here might
have something to do with the libjpeg involved. Mine is
libjpeg.so.8.0.1. Oh and for what it's worth, I get the segfault no
matter how large I make the buffer in your test program.

Olivier