[PATCH] fix Warning in image2wbmp

From: Date: Sun, 22 Feb 2004 11:12:02 +0000
Subject: [PATCH] fix Warning in image2wbmp
Groups: php.internals 
Request: Send a blank email to internals+get-8045@lists.php.net to get a copy of this message
Hello, Here is a small patch to fix a warning in image2wbmp() when you call that function without the optional parameters. Nuno ------------------------- reproduce script: <? $image = imagecreatefrompng('php.png'); image2wbmp($image); ?>

Index: gd.c =================================================================== RCS file: /repository/php-src/ext/gd/gd.c,v retrieving revision 1.287 diff -u -r1.287 gd.c --- gd.c 21 Feb 2004 16:49:39 -0000 1.287 +++ gd.c 22 Feb 2004 11:05:28 -0000 @@ -1682,7 +1682,7 @@ char *fn = NULL; FILE *fp; int argc = ZEND_NUM_ARGS(); - int q = -1, i, t = 1; + int q = 0, i, t = 1; /* The quality parameter for Wbmp stands for the threshold when called from image2wbmp() */ /* When called from imagewbmp() the quality parameter stands for the foreground color. Default: black. */
« previous php.internals (#8045) next »