Received: by smtp02.oce.nl (4.1/SMI-4.1)
	id AA16398; Fri, 23 Oct 98 20:40:25 +0200
Received: from sgi.sgi.com (SGI.COM [192.48.153.1])
	by oce.nl (8.9.0/8.9.0) with ESMTP id UAA13055
	for <rvdt@oce.nl>; Fri, 23 Oct 1998 20:32:15 +0200 (MET DST)
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) 
	by sgi.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id LAA09555; Fri, 23 Oct 1998 11:31:57 -0700 (PDT)
	mail_from (owner-tiff@sgi.engr.sgi.com)
Received: (from majordomo-owner@localhost)
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	id KAA38693
	for tiff-list;
	Fri, 23 Oct 1998 10:57:07 -0700 (PDT)
	mail_from (owner-tiff@sgi.sgi.com)
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id KAA28725
	for <tiff-relay@cthulhu.engr.sgi.com>;
	Fri, 23 Oct 1998 10:57:06 -0700 (PDT)
	mail_from (owner-tiff@sgi.sgi.com)
Received: from lysithea.eastgw.xerox.com (lysithea.xerox.com [208.140.33.22]) 
	by sgi.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id KAA00718
	for <tiff@sgi.com>; Fri, 23 Oct 1998 10:57:04 -0700 (PDT)
	mail_from (twells@cp10.es.xerox.com)
Received: from norman.cp10.es.xerox.com (norman.cp10.es.xerox.com [13.240.124.12])
	by lysithea.eastgw.xerox.com (8.9.1a/8.9.1) with ESMTP id NAA05791
	for <tiff@sgi.com>; Fri, 23 Oct 1998 13:57:02 -0400 (EDT)
Received: from garfield.cp10.es.xerox.com (garfield.cp10.es.xerox.com [13.240.124.50])
	by norman.cp10.es.xerox.com (8.8.5/8.8.5) with ESMTP id KAA06768
	for <tiff@sgi.com>; Fri, 23 Oct 1998 10:57:44 -0700 (PDT)
Received: from cp10.es.xerox.com (chef [13.240.96.38])
	by garfield.cp10.es.xerox.com (8.8.5/8.8.5) with ESMTP id LAA16132
	for <tiff@sgi.com>; Fri, 23 Oct 1998 11:00:18 -0700 (PDT)
Message-Id: <3630C364.2FC8D8FF@cp10.es.xerox.com>
Date: Fri, 23 Oct 1998 10:56:52 -0700
From: Terry Wells <twells@cp10.es.xerox.com>
Organization: Xerox Corporation, El Segundo CA
X-Mailer: Mozilla 4.5 [en] (X11; U; SunOS 5.5.1 sun4u)
X-Accept-Language: en
Mime-Version: 1.0
To: LibTIFF List <tiff@sgi.com>
Subject: tiffcp.c patch for separate tiles
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@fddi-sgi.sgi.com
Precedence: bulk

Sam,

I had previously submitted a patch for tiffcp.c with regard to 
reading separated tiled images.

Unfortunately, I gave the patch against the beta036 version of 
tiffcp.c.

After some checking, it seems that the file had changed in beta037, 
so my patch no longer applied correctly.

Here is my patch again, this time against beta037.

I'm using Solaris diff to make the comparison.  If I should be 
using some other tool to make life easier for you, please let me know.

Thanks much,
Terry Wells

-----

# diff tiff-v3.4beta037/tools/tiffcp.c mytiffcp/tiffcp.c
842a843
> 	uint32 oimagew = imagew * spp;
844c845
< 	int iskew  = imagew - tilew;
---
> 	int iskew  = oimagew - tilew * spp;
872c873
< 					cpSeparateBufToContigBuf(bufp+colb+s,
---
> 					cpSeparateBufToContigBuf(bufp + (colb * spp) + s,
874c875
< 					    oskew + iskew, oskew, spp);
---
> 					    oskew * spp + iskew, oskew, spp);
876c877
< 					cpSeparateBufToContigBuf(bufp+colb+s,
---
> 					cpSeparateBufToContigBuf(bufp + (colb * spp) + s,
882c883
< 		bufp += imagew * nrow;
---
> 		bufp += imagew * nrow * spp;
