#50269 [Opn->Bgs]: getting and setting (new) transparant color error
| From: | pajoye@php.net | Date: | Mon, 23 Nov 2009 10:55:06 +0000 |
| Subject: | #50269 [Opn->Bgs]: getting and setting (new) transparant color error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-144951@lists.php.net to get a copy of this message | ||
ID: 50269
Updated by: pajoye@php.net
Reported By: ericbruggema at hotmail dot com
-Status: Open
+Status: Bogus
Bug Type: GD related
Operating System: WinXP Sp3 dutch
PHP Version: 5.3SVN-2009-11-23 (SVN)
-Assigned To:
+Assigned To: pajoye
New Comment:
if the image is a palette image and has only 10 colors, trying to use
the color 11 will obviously fail.
Previous Comments:
------------------------------------------------------------------------
[2009-11-23 10:39:51] ericbruggema at hotmail dot com
Description:
------------
The problem is that when reading a transparant color from an existing
image in some cases can't be used to set the transparant color for new
images.
Reproduce code:
---------------
$im = imagecreatefromgif("image.gif");
$trnprt_indx = imagecolortransparent($im);
$trnprt_color = @imagecolorsforindex($im, $trnprt_indx); // error line
Expected result:
----------------
imagecolorsforindex() [<a
href='function.imagecolorsforindex'>function.imagecolorsforindex</a>]:
Color index 251 out of range
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50269&edit=1