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.26 04:50 "Re: Cannot read YCbCr JPEG-compressed images", by Bob Friesenhahn

On Mon, 24 Jan 2011, Craig Bruce wrote:
> JPEGDecodeRaw: application buffer not large enough for all data..
> ERROR!
>
> 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.

The bug you are reporting has been reported several times before. 
Please let us know if you find a correct fix.

The reason why our readers are working is because we tell libtiff to 
use JPEGCOLORMODE_RGB like:

(void) TIFFSetField( tiff, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB );

And then libjpeg helps by returning upsampled RGB data to libtiff 
using reader code designed for PHOTOMETRIC_RGB.

If your software really was capable of dealing with all of the nuances 
associated with YCbCr (filtering, subsampling, etc.) then you would 
probably prefer to deal directly with it.  Very little software in the 
TIFF world is currently capable of doing that.  Horizontal sampling is 
not too bad to deal with, but things become more complex when vertical 
sampling is added.  JPEG samples in an 8x8 or 16x16 tile size.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/