summaryrefslogtreecommitdiff
path: root/graphics/tiff/patches
diff options
context:
space:
mode:
authorabs <abs>2004-03-22 16:48:13 +0000
committerabs <abs>2004-03-22 16:48:13 +0000
commit1cbb82a1adb39552f61138ec4e667cf7020ea6e8 (patch)
tree6ded41b22f8729e4775049cac2e8004f4967bdfb /graphics/tiff/patches
parentce28329b555ac0d1df3b7733aa757a06b7aea9d6 (diff)
downloadpkgsrc-1cbb82a1adb39552f61138ec4e667cf7020ea6e8.tar.gz
Update tiff to tiff-3.6.1nb1:
Add a patch to fix fax3 tiff handling. Without this hylafax generates completely garbled tiff images unless error correction was disabled: http://bugs.hylafax.org/bugzilla/show_bug.cgi?id=500
Diffstat (limited to 'graphics/tiff/patches')
-rw-r--r--graphics/tiff/patches/patch-ag32
1 files changed, 21 insertions, 11 deletions
diff --git a/graphics/tiff/patches/patch-ag b/graphics/tiff/patches/patch-ag
index 77a28c3b1dd..b902dedc88d 100644
--- a/graphics/tiff/patches/patch-ag
+++ b/graphics/tiff/patches/patch-ag
@@ -1,13 +1,23 @@
-$NetBSD: patch-ag,v 1.4 2004/01/03 18:33:24 reed Exp $
+$NetBSD: patch-ag,v 1.5 2004/03/22 16:48:13 abs Exp $
---- libtiff/tif_fax3.c.orig Mon Sep 29 23:13:07 2003
+--- libtiff/tif_fax3.c.orig Mon Mar 22 16:34:59 2004
+++ libtiff/tif_fax3.c
-@@ -311,7 +311,7 @@ Fax3Decode2D(TIFF* tif, tidata_t buf, ts
- * this is <8 bytes. We optimize the code here to reflect the
- * machine characteristics.
- */
--#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__)
-+#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__) || defined(_LP64)
- #define FILL(n, cp) \
- switch (n) { \
- case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\
+@@ -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;