cvs: gd /libgd/src gd_tiff.c

[email protected] ("Mattias Bengtsson") Tue, 23 Oct 2007 00:33:52 -0000
Newsgroups php.gd.cvs
Message-ID <cvsmattias1193099632@cvsserver>
mattias		Tue Oct 23 00:33:52 2007 UTC

  Modified files:              
    /gd/libgd/src	gd_tiff.c 
  Log:
  - Removed todo
  
http://cvs.php.net/viewvc.cgi/gd/libgd/src/gd_tiff.c?r1=1.13&r2=1.14&diff_format=u
Index: gd/libgd/src/gd_tiff.c
diff -u gd/libgd/src/gd_tiff.c:1.13 gd/libgd/src/gd_tiff.c:1.14
--- gd/libgd/src/gd_tiff.c:1.13	Sat Oct 13 18:18:27 2007
+++ gd/libgd/src/gd_tiff.c	Tue Oct 23 00:33:52 2007
@@ -27,7 +27,7 @@
 
    ----------------------------------------------------------------------------
  */
-/* $Id: gd_tiff.c,v 1.13 2007/10/13 18:18:27 scottmac Exp $ */
+/* $Id: gd_tiff.c,v 1.14 2007/10/23 00:33:52 mattias Exp $ */
 
 #ifdef HAVE_CONFIG_H
 	#include "config.h"
@@ -272,12 +272,11 @@
 	TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC,
 					(bitDepth == 24) ? PHOTOMETRIC_RGB : PHOTOMETRIC_PALETTE);
 
-	bitsPerSample = (bitDepth ==24) ? 8 : ((bitDepth == 8) ? 8 : 1);
+	bitsPerSample = (bitDepth == 24 || bitDepth == 8) ? 8 : 1;
 	TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, bitsPerSample);
 
 	/* build the color map for 8 bit images */
 	if(bitDepth != 24) {
-		/*TODO: Add checking */
 		colorMapRed   = (uint16 *) gdMalloc(3 * (1 << bitsPerSample));
 		if (!colorMapRed) {
 			return;