ID: 50269 User updated by: ericbruggema at hotmail dot com Reported By: ericbruggema at hotmail dot com Status: Bogus Bug Type: GD related Operating System: WinXP Sp3 dutch PHP Version: 5.3SVN-2009-11-23 (SVN) Assigned To: pajoye New Comment:
er?? the current image will be copied to a new image (thumb) but i'd like to keep the current 'transparant' color, but this gives an error... looks like the index for the transparant color (current image) doesn't exists in the color palette... (current image) Previous Comments: ------------------------------------------------------------------------ [2009-11-23 10:55:06] paj...@php.net if the image is a palette image and has only 10 colors, trying to use the color 11 will obviously fail. ------------------------------------------------------------------------ [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