0b0e7ff81a
http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=500 http://bugzilla.remotesensing.org/show_bug.cgi?id=483 Thanks to Uwe Dippel <udippel at uniten dot edu dot my> for bringing this to my attention.
23 lines
919 B
Plaintext
23 lines
919 B
Plaintext
$OpenBSD: patch-libtiff_tif_fax3_c,v 1.3 2004/05/18 23:35:35 brad Exp $
|
|
--- libtiff/tif_fax3.c.orig 2004-05-18 18:32:41.000000000 -0400
|
|
+++ libtiff/tif_fax3.c 2004-05-18 18:41:06.000000000 -0400
|
|
@@ -451,7 +451,7 @@ Fax3SetupState(TIFF* tif)
|
|
Fax3BaseState* sp = Fax3State(tif);
|
|
long rowbytes, rowpixels;
|
|
int needsRefLine;
|
|
- Fax3CodecState* dsp = DecoderState(tif);
|
|
+ Fax3CodecState* dsp = (Fax3CodecState*) DecoderState(tif);
|
|
uint32 nruns;
|
|
|
|
if (td->td_bitspersample != 1) {
|
|
@@ -1284,7 +1284,8 @@ InitCCITTFax3(TIFF* tif)
|
|
sp->recvparams = 0;
|
|
sp->subaddress = NULL;
|
|
|
|
- tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */
|
|
+ if (sp->rw_mode == O_RDONLY) /* FIXME: improve for in place update */
|
|
+ tif->tif_flags |= TIFF_NOBITREV; /* decoder does bit reversal */
|
|
DecoderState(tif)->runs = NULL;
|
|
TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns);
|
|
EncoderState(tif)->refline = NULL;
|