Thanks, I was wondering why that was not working for png, but considering the nature of the format, though, that makes sense.
For fun for others, the following will take a png image, analyze the color at location 0,0 of the image or the top left corner and replace that color throughout the image with the color green, reanalyze the color at the top left corner and change the green to transparent, save the image at 'test1.png' and then display that newly created image with an orange background.
PHP Code:
<?php
$filename = 'http://www.animeviews.com/images/pops/image.png';
$im = imagecreatefrompng($filename);
imagetruecolortopalette($im, false, 255);
$ig = imagecolorat($im, 0, 0);
imagecolorset($im, $ig, 0, 255, 0);
$ig = imagecolorat($im, 0, 0);
imagecolortransparent($im, $ig);
$dest="test1.png";
imagepng($im,$dest);
?><div style='background-color:orange;position:absolute;'><img src='test1.png'></div>
Tadaa!
Bookmarks