summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordron <dron>2010-07-02 09:49:23 +0000
committerdron <dron>2010-07-02 09:49:23 +0000
commit18be7c9e9f3630325d591bb9efc96ccf25891ee3 (patch)
tree8048b03713b49841ba4be57e552328329f283c40
parentdcb3b062bfb3e62b0b57c369e463f115b720e827 (diff)
downloadlibtiff-18be7c9e9f3630325d591bb9efc96ccf25891ee3.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog9
-rw-r--r--libtiff/tif_dir.c6
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9316ab82..03703234 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-02 Andrey Kiselev <dron@ak4719.spb.edu>
+
+ * libtiff/tif_dir.c: Set the bogus post-decoding hook when processing
+ TIFFTAG_BITSPERSAMPLE in _TIFFVSetField() for the case of 8 bit when
+ we don't need any post-processing. That helps to reset the hook if we
+ previously set this field to some other value and the hook was
+ initialized accordingly. As per bug
+ http://bugzilla.maptools.org/show_bug.cgi?id=2035
+
2010-06-30 Andrey Kiselev <dron@ak4719.spb.edu>
* tools/tiff2pdf.c: Better generation of ID field in
diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
index ac44b381..335ee58f 100644
--- a/libtiff/tif_dir.c
+++ b/libtiff/tif_dir.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dir.c,v 1.75.2.5 2010-06-09 21:15:27 bfriesen Exp $ */
+/* $Id: tif_dir.c,v 1.75.2.6 2010-07-02 09:49:23 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -163,7 +163,9 @@ _TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
* work in with its normal work.
*/
if (tif->tif_flags & TIFF_SWAB) {
- if (td->td_bitspersample == 16)
+ if (td->td_bitspersample == 8)
+ tif->tif_postdecode = _TIFFNoPostDecode;
+ else if (td->td_bitspersample == 16)
tif->tif_postdecode = _TIFFSwab16BitData;
else if (td->td_bitspersample == 24)
tif->tif_postdecode = _TIFFSwab24BitData;