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
March 2010

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

2010.03.16 19:45 "TIFFVStripSize overflow, JPEG decoding", by Lee Cooper
2010.03.16 21:08 "Re: TIFFVStripSize overflow, JPEG decoding", by Bob Friesenhahn
2010.03.17 20:19 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode
2010.03.17 21:36 "Re: TIFFVStripSize overflow, JPEG decoding", by Tom Lane
2010.03.18 00:11 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode
2010.03.16 22:34 "Re: TIFFVStripSize overflow, JPEG decoding", by Lee Cooper
2010.03.17 16:42 "Re: TIFFVStripSize overflow, JPEG decoding", by Jason Summers
2010.03.17 20:18 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode
2010.03.17 20:59 "Re: TIFFVStripSize overflow, JPEG decoding", by Lee Cooper
2010.03.18 00:15 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode
2010.03.18 02:40 "Re: TIFFVStripSize overflow, JPEG decoding", by Olivier Paquet
2010.03.19 15:52 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode
2010.03.19 16:39 "Re: TIFFVStripSize overflow, JPEG decoding", by Bob Friesenhahn
2010.03.19 18:18 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode
2010.03.19 23:43 "Re: TIFFVStripSize overflow, JPEG decoding", by Bob Friesenhahn

2010.03.17 20:18 "Re: TIFFVStripSize overflow, JPEG decoding", by Adam Goode

On 03/16/2010 03:45 PM, Lee Cooper wrote:
> I am trying to develop software to support a new tiff file source of large
> medical images.  Using libtiff I am encountering problems with TIFFOpen, I
> suspect because the dimensions are causing overflow of 32-bit variables
> (image dimensions in the tens-of-thousands).
> 
> I am aware of the bigtiff project but that is not an option in this case
> since I don't have control over how the files are generated.  Since I only
> have to support a very limited format (file organization is always the
> same), I am hoping to generate some simple specific code that uses header
> information to read the image contents.  The files contain multiple
> "pages", each encoded with JPEG.  I have listed a sample tiffdump output
> below.
> 
> If I have the offset from the header, is there a way to decode the output
> without using TIFFOpen directly?  I don't mind writing some software but
> would prefer not to decode the JPEG from scratch :)
> 
> Regards,
> Lee


NDPI! How fun. It's basically a set of crazy JPEG files and some
metadata crammed into a TIFF container (Hamamatsu VMS format as TIFF).
The trick is reading just enough of the header to decode the proprietary
metadata tags, then reading the JPEG files directly with a JPEG decoder.
Unfortunately, while it is a valid TIFF file, it is not really a
viewable TIFF image (at least with libtiff).

I forget exactly where libtiff 3 overflows, but it reads 2 fields and
multiplies them together, and that exceeds a 32-bit number. libtiff 4
does not overflow here.

For OpenSlide, I will eventually need to support this. I think almost
all of the code for reading VMS will be adaptable if I could get libtiff
to read the header. It would be nice to not require libtiff 4 for this,
but I didn't have time to dig in to libtiff yet.

http://openslide.cs.cmu.edu/


Adam