AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1997.02.21 20:50 "Group 4 read error fix...", by Rob Nielsen
1997.02.26 17:52 "Re: Group 4 read error fix...", by Sam Leffler

1997.02.21 20:50 "Group 4 read error fix...", by Rob Nielsen

Hi,

We have a whole bunch of group 4 files that libtiff was having problems reading. These same files were viewable with PreView and other tiff viewers (Vax based).

Anyway here's the diff output of tif_read.c from tiff-v3.4beta035-tar.gz

Rob

----- Begin Included Message -----

*** tif_read.c.orig     Mon Feb 10 13:42:53 1997
--- tif_read.c  Fri Feb 21 14:40:59 1997
***************
*** 253,260 ****
                         */
                        TIFFError(module, "%s: Read error on strip %lu",
                            tif->tif_name, (u_long) strip);
!                       tif->tif_curstrip = NOSTRIP;
!                       return (0);
                }
                tif->tif_rawdatasize = bytecount;
                tif->tif_rawdata = tif->tif_base + td->td_stripoffset[strip];
--- 253,262 ----
                         */
                        TIFFError(module, "%s: Read error on strip %lu",
                            tif->tif_name, (u_long) strip);

!                         bytecount = tif->tif_size - td->td_stripoffset[strip];
!                         td->td_stripbytecount[strip] = bytecount;
!                           
                }
                tif->tif_rawdatasize = bytecount;
                tif->tif_rawdata = tif->tif_base + td->td_stripoffset[strip];

------ End Included Message ------

---
Rob Nielsen                   rob_nielsen@adc.com
ADC Telecommunications, Inc.  http://www.cs.ndsu.nodak.edu/alumni/rob_nielsen 
4900 West 78th Street         (612) 896-2706
Minneapolis, MN  55345        (612) 896-2959 - fax