Bug #8664 Updated: Impossible to use ImageColorTransparent under certain conditions

From: Date: Sun, 22 Jul 2001 00:45:36 +0000
Subject: Bug #8664 Updated: Impossible to use ImageColorTransparent under certain conditions
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-60510@lists.php.net to get a copy of this message
ID: 8664 Updated by: andy Reported By: reinke@e-softinc.com Status: Closed Bug Type: GD related Operating System: Linux PHP Version: 4.0.1pl2 New Comment: Try using ImageColorExact or ImageColorClosest The manual pages are below http://php.net/manual/en/function.imagecolorexact.php http://php.net/manual/en/function.imagecolorclosest.php Previous Comments: ------------------------------------------------------------------------ [2001-07-21 20:45:17] andy@php.net Try using ImageColorExact or ImageColorClosest The manual pages are below http://php.net/manual/en/function.imagecolorexact.php http://php.net/manual/en/function.imagecolorclosest.php ------------------------------------------------------------------------ [2001-01-11 17:10:08] reinke@e-softinc.com By limiting the use of ImageColorTransparent to working on colors returned by ImageColorAllocate, the library prevents one from modifying pre-existing images. For example, suppose an existing image has a transparent color set. Now, we load the image using ImageCreateFromGIF. We proceed to add a text blurb, and then issue ImageGif. The transparency is removed, and there is no way to set it, because there is no way to map an existing color index in the palette to an ImageColor object(?) so that it can be passed in to ImageColorTransparent. Ideally, ImageColorTransparent should have been made to work with color indexes the way the native gd routines work. But, to avoid breaking code, I'd recommend adding a new method called ImageColorTransparentByIndex which accepted a color index as the second parameter instead of a color object returned by ImageColorAllocate. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=8664&edit=1

« previous php.dev (#60510) next »