blob: b902dedc88daf38effc975853b8a772503fd145a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$NetBSD: patch-ag,v 1.5 2004/03/22 16:48:13 abs Exp $
--- libtiff/tif_fax3.c.orig Mon Mar 22 16:34:59 2004
+++ libtiff/tif_fax3.c
@@ -451,7 +451,7 @@ Fax3SetupState(TIFF* tif)
Fax3BaseState* sp = Fax3State(tif);
long rowbytes, rowpixels;
int needsRefLine;
- Fax3CodecState* dsp = DecoderState(tif);
+ Fax3CodecState* dsp = (Fax3CodecState*) Fax3State(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;
|