Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas020.isp.belgacom.be (localhost [127.0.0.1])
        by inav007.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k3EGwu0S008653
        for <joris.at.lebbeke@skynet.be>; Fri, 14 Apr 2006 18:58:57 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx018.isp.belgacom.be (inmx018.isp.belgacom.be [195.238.4.79])
        by inas020.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k3EGwpe3006071
        for <joris.at.lebbeke@skynet.be>; Fri, 14 Apr 2006 18:58:52 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx018.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-IN-2.32) with ESMTP id k3EGwd0i011205
        for <joris.at.lebbeke@skynet.be>; Fri, 14 Apr 2006 18:58:39 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k3EGqoCm027140;
	Fri, 14 Apr 2006 12:53:24 -0400
Received: from outmx023.isp.belgacom.be (outmx023.isp.belgacom.be
	[195.238.4.204])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k3EGqjoZ027137
	for <tiff@lists.maptools.org>; Fri, 14 Apr 2006 12:52:46 -0400
Received: from outmx023.isp.belgacom.be (localhost [127.0.0.1])
	by outmx023.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with ESMTP id k3EGqgh4031218
	for <tiff@lists.maptools.org>; Fri, 14 Apr 2006 18:52:42 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (86.148-246-81.adsl-dyn.isp.belgacom.be
	[81.246.148.86])
	by outmx023.isp.belgacom.be (8.12.11.20060308/8.12.11/Skynet-OUT-2.22)
	with SMTP id k3EGqbCx031168; Fri, 14 Apr 2006 18:52:38 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <002001c65fe3$d78a0740$5694f651@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Jason Summers" <jason1@pobox.com>, <tiff@lists.maptools.org>
References: <443FB8E4.7080901@pobox.com>
Subject: Re: [Tiff] TIFFReadScanline with JPEG compression
Date: Fri, 14 Apr 2006 18:48:56 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.000015b7
X-MSP-STORE: Fri, 14 Apr 2006 18:59:03 +0200
Status:   

Jason,

Jason Summers wrote:
> 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.
>
> 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

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
