I have been searching for a way to dynamically colorize png images using PHP. The images have transparency that must be preserved (ie. I don't want anything that is transparent to become colorized). I have searched through the PHP-GD help files and online, but I can't seem to put anything satisfactory together.
Put another way, can you write PHP code that changes the attached png from green to blue while preserving the detail and alpha channel?
A couple of caveats:
1) I can't use the GD function 'imagefilter' because it is disabled in Ubuntu 8.10 and I don't want to recompile PHP from source (and risk destruction of my current working local web server). Any other GD functions that don't have the same restrictions as 'imagefilter' are fair game.
2) I can't use ImageMagick because of restrictions imposed by my web hosting plan.