Subject: pkg/28989: Libtiff bug with transparency
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <david.kanter@uchospitals.edu>
List: pkgsrc-bugs
Date: 01/17/2005 02:57:00
>Number:         28989
>Category:       pkg
>Synopsis:       Libtiff bug with transparency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 17 02:57:00 +0000 2005
>Originator:     David Kanter
>Release:        2.0
>Organization:
>Environment:
NetBSD xxx.attbi.com 2.0 NetBSD 2.0 (MYKERNEL) #0: Sat Jan  8 04:37:56 CST 2005  root@xxx.attbi.com:/usr/src/sys/arch/i386/compile/MYKERNEL i38
>Description:
There is a bug in the new libtiff (3.7.1) which causes docked icons in WindowMaker to have a black background rather than a transparent background.
>How-To-Repeat:
Upgrade to pkgsrc tiff 3.7.1
>Fix:
This patch from http://bugzilla.remotesensing.org fixes the problem. Just adapt it for NetBSD:

Index: tif_getimage.c
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/libtiff/tif_getimage.c,v
retrieving revision 1.43
diff -u -p -r1.43 libtiff/tif_getimage.c
--- libtiff/tif_getimage.c	19 Dec 2004 17:11:17 -0000	1.43
+++ libtiff/tif_getimage.c	24 Dec 2004 09:30:18 -0000
@@ -247,7 +247,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, T
     TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
     TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
 	&extrasamples, &sampleinfo);
-    if (extrasamples > 1)
+    if (extrasamples >= 1)
     {
 	switch (sampleinfo[0]) {
 	case EXTRASAMPLE_UNSPECIFIED:	/* Workaround for some images without */