1994.02.19 14:18 "DECAlpha version bug in tiffcp.c in 3.3beta002", by epeisach@MIT.EDU
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)