Return-Path: owner-tiff@olympiakos.com
Return-Path: <owner-tiff@olympiakos.com>
Received: from localhost (localhost [127.0.0.1])
	by at1895.spb.edu (8.12.0.Beta7/8.12.0.Beta7) with ESMTP id f6N9PcFW017197
	for <dron@localhost>; Mon, 23 Jul 2001 13:31:49 +0400
Received: from eudoramail.com [209.185.123.45]
	by localhost with POP3 (fetchmail-5.8.1)
	for dron@localhost (single-drop); Mon, 23 Jul 2001 13:31:49 +0400 (MSD)
Received: from gate7.olympiakos.com ([207.176.88.85]) by shared1-mail.whowhere.com; Fri Jul 20 10:15:56 2001
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id MAA23255;
	Fri, 20 Jul 2001 12:52:07 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Fri, 20 Jul 2001 12:50:03 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id MAA23138
	for tiff-outgoing; Fri, 20 Jul 2001 12:50:03 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from mail.mediacy.com (mail.mediacy.com [209.183.194.67])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id MAA23134
	for <tiff@olympiakos.com>; Fri, 20 Jul 2001 12:50:00 -0400
Received: by mail.mediacy.com from localhost
    (router,SLMail V5.0); Fri, 20 Jul 2001 12:53:37 -0400 
    for <tiff@olympiakos.com>
Received: from sean [209.183.197.241]
 by mail.mediacy.com [209.183.194.67]  (SLmail 5.0.0.4342) with SMTP
 id E6BBAF8E7C4811D5BFE800104B2D6CEC
 for <twells@cp10.es.xerox.com> plus 2 more; Fri, 20 Jul 2001 12:53:36 -0400
From: "Sean Finn" <sean@mediacy.com>
To: <twells@cp10.es.xerox.com>, "Bruno LEDOUX" <bruno_ledoux@binuscan.com>
Cc: <tiff@olympiakos.com>
Subject: RE: LZW TIFFReadScanline woes
Date: Fri, 20 Jul 2001 12:52:10 -0400
Message-ID: <001b01c1113c$51ada910$720a0a0a@mediacy.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
In-Reply-To: <3B585339.651C9C7C@cp10.es.xerox.com>
X-SLUIDL: E0E84D41-7C4811D5-BFE80010-4B2D6CEC
Sender: owner-tiff@olympiakos.com
Status: RO
Content-Length: 2013
Lines: 69

Sorry, I should have put this in the original question:

I have a routine that skips through the Tiff file, let's call it TSeek(int
lines).  It basically looks like this:

void TSeek(int lines)
{
  for(int i=0; i < lines; ++i)
  {
    // buf is a previously allocated 1-scanline size'd buffer
    TIFFReadScanlines(m_tif, buf, 1);
  }
}

This allows me to walk through the compressed file without worrying about
random access.  The sub-sampled images, on further inspection, seem to have
a problem when the Strip changes.  There is either a duplicated scanline or
a missing one.  My seek routine is the likely suspect, other than there are
no problems using the same code in an uncompressed file.

I have a work-around of uncompressed the whole image into a local buffer,
and then skipping around in that to retrieve my sub-sampling.  This is fine
(inefficient, but fine) until I get to a large file (we have a couple 60
MB).

Thanks for everyone's help,

Sean

-----Original Message-----
From: twells@cp10.es.xerox.com [mailto:twells@cp10.es.xerox.com]
Sent: Friday, July 20, 2001 11:50 AM
To: Bruno LEDOUX
Cc: Sean Finn; tiff@olympiakos.com
Subject: Re: LZW TIFFReadScanline woes


The optimizer in VC++ 5 had quite a few bugs in it.  VC++ 6 seems much
better.

Back to the original problem...

Sean: You said that you were subsampling the image by skipping scanlines
when
reading.  Perhaps something to try would be to read all the scanlines into
your
buffer even though you ignore some of them.  If the lzw decompressor had a
bug
where it failed to properly decode lines out of order, this would workaround
it.

Terry


Bruno LEDOUX wrote:

> On 19/07/01 23:29, "Sean Finn" <sean@mediacy.com> wrote:
>
> Hi,
>
> I remember that I had problems with LZW compression/decompression
> When compiling in release mode ie with all optimizations on.  When I
turned
> them off for the tiff_lzw.c  file everything worked. I don't know what
> compiler you are using but for me it occurred with VC++ 5.
>
> Hth,
>
> bruno

