From b3395bf1f138dad410afb3877ab6beff2c497cea Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Fri, 2 Jul 2010 09:48:25 +0000 Subject: [PATCH] *** empty log message *** --- ChangeLog | 9 +++++++++ libtiff/tif_dir.c | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91c2182b..84e68c6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-07-02 Andrey Kiselev + + * 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-07-01 Andrey Kiselev * tools/tiffgt.c: Properly check the raster buffer allocations for diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c index acf74652..a4bc48b2 100644 --- a/libtiff/tif_dir.c +++ b/libtiff/tif_dir.c @@ -1,4 +1,4 @@ -/* $Id: tif_dir.c,v 1.104 2010-04-10 19:22:34 bfriesen Exp $ */ +/* $Id: tif_dir.c,v 1.105 2010-07-02 09:48:25 dron Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -165,7 +165,9 @@ _TIFFVSetField(TIFF* tif, uint32 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;