AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
September 1999

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



1999.09.15 08:57 "[Fwd: Fix for decompression bug (sizes >= 65536)]", by Jacques Thiebauld

I would like to say thank-you to everybody who helps me to solve with my
G4 image problem.
Hereafter you can find the fix that solve my problem (it was line sizes
> 65536)..

Jacques

From: Peter Smith <psmith@creo.com>
Date: Tue, 14 Sep 1999 17:22:15 +0200
To: jacth@dalim.de
Subject: Fix for decompression bug (sizes >= 65536)
Message-ID: <E268474520F92B38C12567EC00546F4E.00546F89C12567EC@kehl.dalim.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit



>X-From_: owner-tiff@olympiakos.com  Thu May 20 03:00:25 1999
>X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to
owner-tiff@olympiakos.com using -f
>Date: Thu, 20 May 1999 11:01:25 +0200
>From: "Franois Dagand" <Francois.Dagand@mc2.fr>
>Organization: MC2
>X-Mailer: Mozilla 4.06 [fr] (Win98; I)
>To: tiff@sgi.com
>Subject: Fix for decompression bug (sizes >= 65536)
>Sender: owner-tiff@olympiakos.com
>X-Eagle-Notice: Sender not 8-bit clean in 'From: \"Fran\347ois Dagand\"
<Francois.Dagand@mc2.fr>'
>
>
>Hello again,
>
>I just received a mail from Frank D. Cringle, the guy who wrote viewfax,
>a software
>for displaying TIFF files on X-Windows. The decompression algorithm for
>this software
>was used in libtiff, according to the comments. This soft also had a
>problem for tiffs
>wider than 65536 pixels. Frank gave me a correction for this bug in
>viewfax, and I was
>able to port the correction to libtiff. Don't ask me how it works,
>though.
>
>If you want to go over that limit of 65536, modify files tif_fax3.h and
>tif_fax3.c (lines number
>from  v3.4 beta). ">" is the modified code, "<" is the original :
>
>tif_fax3.h :
>
>46c46
><  * fillruns(unsigned char* buf, uint16* runs, uint16* erun, uint32
>lastx)
>>  * fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32
>lastx)
>55c55
>< typedef void (*TIFFFaxFillFunc)(unsigned char*, uint16*, uint16*,
>uint32);
>> typedef void (*TIFFFaxFillFunc)(unsigned char*, uint32*, uint32*,
>uint32);
>63c63
>< extern void _TIFFFax3fillruns(unsigned char*, uint16*, uint16*,
>uint32);
>> extern void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*,
>uint32);
>87c87
><  uint16 Param;  /* unsigned 16-bit run length in bits */
>>  uint32 Param;  /* unsigned 32-bit run length in bits */
>
>tif_fax3.c :
>
>81,83c81,83
><  uint16* runs;      /* b&w runs for current/previous row */
><  uint16* refruns;  /* runs for reference line */
><  uint16* curruns; /* runs for current line */
>>  uint32* runs;      /* b&w runs for current/previous row */
>>  uint32* refruns;  /* runs for reference line */
>>  uint32* curruns; /* runs for current line */
>120,121c120,121
><     uint16* pa;    /* place to stuff next run */ \
><     uint16* thisrun;   /* current row's run array */ \
>>     uint32* pa;    /* place to stuff next run */ \
>>     uint32* thisrun;   /* current row's run array */ \
>128c128
><     uint16* pb    /* next run in reference line */\
>>     uint32* pb    /* next run in reference line */\
>298c298
><   SWAP(uint16*, sp->curruns, sp->refruns);
>>   SWAP(uint32*, sp->curruns, sp->refruns);
>361c361
>< _TIFFFax3fillruns(u_char* buf, uint16* runs, uint16* erun, uint32
>lastx)
>> _TIFFFax3fillruns(u_char* buf, uint32* runs, uint32* erun, uint32
>lastx)
>502c502
><   dsp->runs = (uint16*) _TIFFmalloc(nruns*sizeof (uint16));
>>   dsp->runs = (uint32*) _TIFFmalloc(nruns*sizeof (uint32));
>1378c1378
><   SWAP(uint16*, sp->curruns, sp->refruns);
>>   SWAP(uint32*, sp->curruns, sp->refruns);
>
>--- end ---
>
>
-----------------------------------------------------------------
Peter Smith
mailto:plsmith@island.net
mailto:psmith@creo.com (forwarded directly to the above address)
Phone: 250-285-2294


Attachment Converted: "C:\Eudora\Attach\vcard5.vcf"