AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2006.04.14 14:59 "[Tiff] TIFFReadScanline with JPEG compression", by Jason Summers
2006.04.14 16:48 "Re: [Tiff] TIFFReadScanline with JPEG compression", by Joris
2006.04.17 20:47 "Re: [Tiff] TIFFReadScanline with JPEG compression", by Jason Summers
2006.04.17 22:25 "Re: [Tiff] TIFFReadScanline with JPEG compression", by Joris

2006.04.14 16:48 "Re: [Tiff] TIFFReadScanline with JPEG compression", by Joris

Jason,

I'm having trouble getting libtiff's TIFFReadScanline function to work with:

  1. grayscale old-JPEG images. Some scanlines succeed, but others fail with a "LibJpeg: Improper call to JPEG library in state 0" error. This is with the latest libtiff from CVS. It works fine if I use TIFFReadEncodedStrip.
  2. color new-JPEG images when using JPEGCOLORMODE_RGB. This used to work for me, but it has stopped working in recent versions of libtiff, at least for some images such as the quad-jpeg.tif sample. Using TIFFReadEncodedStrip (without JPEGCOLORMODE_RGB) works fine.
  3. I know I may not be giving enough details. But is TIFFReadScanline even *supposed* to work in these cases, or should I just give up and always use the memory-hungry TIFFReadEncodedStrip?

If your need is urgent, I recommend using strip access without JPEGCOLORMODE_RGB. That part was recently serviced, and should work fine (as you seem to indicate). For other approaches, please feel free to file a bug report in BugZilla, and post a follow-up with the exact URL of the BugZilla entry here. I'll try and deal with it as soon as I can.

Best regards,

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html