From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.0.1pl2
PHP Bug Type:     GD related
Bug description:  Impossible to use ImageColorTransparent under certain conditions

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 Bug report at: http://bugs.php.net/?id=8664&edit=1



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to