AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.02.24 19:35 "tiff2ps segfaults with quad-jpeg.tif", by Peter Kirchgessner
2003.02.25 21:00 "Re: tiff2ps segfaults with quad-jpeg.tif", by Andrey Kiselev

2003.02.25 21:00 "Re: tiff2ps segfaults with quad-jpeg.tif", by Andrey Kiselev

Hi, Peter,

I was just looking for an example how to read JPEG-compressed TIFF files. I noticed that tiff2ps from tiff-v3.6.0-beta segfaults with quad-jpeg.tif from the set of testfiles.

I can't reproduce this problem with the latest tiff2ps from CVS tree. Probably you should update your libtiff installation?

tiff2ps is trying to read the image with TIFFReadScanline(), wheras tiff2rgb is reading it with TIFFReadRGBAImage(). Is the latter one the preferred way? This would require to allocate memory for the complete image.

TIFFReadRGBAImage() is a simplest way to read TIFF files, especially for purposes of the simple viewers. TIFFReadScanline() is a simple way as well and it has few drawbacks. You couldn't read tiled image with the TIFFReadScanline() call.

If you want create powerful application, it should use TIFFReadEncodedStrip() and TIFFReadTile() calls. But in this case all work to handle different datatypes, photometric interpretations and image composing belongs to your application.

--
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517