Received: by whizzer.wpd.sgi.com (/911001.SGI)
	 id AA06913; Sat, 19 Feb 94 14:18:40 GMT
Received: from sgi.sgi.com by whizzer.wpd.sgi.com via SMTP (/911001.SGI)
	for /usr/people/sam/majordomo/wrapper resend -l tiff -h sgi.sgi.com -f tiff-owner -s -m "-oi -odq -om" tiff-list id AA06906; Sat, 19 Feb 94 06:18:37 -0800
Received: from ATHENA-AS-WELL.MIT.EDU by sgi.sgi.com via SMTP (931110.SGI/910110.SGI)
	for tiff-relay@whizzer.wpd.sgi.com id AA18974; Sat, 19 Feb 94 06:18:35 -0800
Received: from KANGAROO.MIT.EDU by MIT.EDU with SMTP
	id AA23368; Sat, 19 Feb 94 09:18:34 EST
From: epeisach@MIT.EDU
Received: by kangaroo.mit.edu (5.65/4.7) id AA01288; Sat, 19 Feb 1994 09:18:33 -0500
Date: Sat, 19 Feb 1994 09:18:33 -0500
Message-Id: <9402191418.AA01288@kangaroo.mit.edu>
To: tiff@sgi.sgi.com
Subject: DECAlpha version bug in tiffcp.c in 3.3beta002
Sender: tiff-owner@sgi.sgi.com


I applied the patches that someone else on the list submitted. (I
appologize in advance as I no longer have the patch that was submitted a
while ago to the list.

I came across two gotchas:

In README the example says to use "tiffcp -lzw cramps.tif x1.tif"
and then "tiffcmp cramps.tif x1.tif"

This does not work as cramps.tif (as I pulled down) is in packbits
format and you get a warning.

Better one:
tiffcp -lzw cramps.tif x1.tif
tiffcp -packbits x1.tif x2.tif
tiffcmp cramps.tif x2.tif

I also came across a silent optimization bug of an unsigned comparison
with zero in setting the rowsperstrip (an uint32 be compared < 0 will of
course never happen and will be optimized out).

This was discovered because I decided to use tiffinfo after a tiffcp and
noticed the discrepency in the field.

Enjoy.

*** 1.2	1994/02/19 13:25:19
--- tiffcp.c	1994/02/19 13:50:37
***************
*** 394,400 ****
  		 * value from the input image or, if nothing is defined,
  		 * something that approximates 8Kbyte strips.
  		 */
! 		if (rowsperstrip < 0 &&
  		    !TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip))
  			rowsperstrip = (8*1024)/TIFFScanlineSize(out);
  		if (rowsperstrip == 0)
--- 394,400 ----
  		 * value from the input image or, if nothing is defined,
  		 * something that approximates 8Kbyte strips.
  		 */
! 		if ((int32) rowsperstrip < 0 &&
  		    !TIFFGetField(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip))
  			rowsperstrip = (8*1024)/TIFFScanlineSize(out);
  		if (rowsperstrip == 0)


