Re: [GD-DEVEL] Color Overlay
[email protected] (Pierre)
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jason, On 9/11/07, Jason Hart <[email protected]> wrote: > Thanks Pierre for you help... Your are welcome :) > It's not quite what I was after I had managed > to do that bit :) > // Colorize overlay image > imagefilter($overlay, IMG_FILTER_COLORIZE, hexdec('0x' . $color{0} . > $color{1}), hexdec('0x' . $color{2} . $color{3}), hexdec('0x' . $color{4} . > $color{5})); I just commited a patch in php 5.2+ and HEAD. This filter supports now the alpha channel. For example, if you like to add transparency to a complete image: imagefilter($overlay, IMG_FILTER_COLORIZE, 0,0,0, 63); // add 50% alpha (alpha is 0 to 127) Cheers, --Pierre