I am trying to load a GIF image, which includes transparent areas, and make more matching colors transparent (preferably a range of colors), and save that file back to disk. All while maintaining transparency.
I tried a few things:
[php]
$index2 = imagecolorresolve ( $im, 225,225,225 ); // get grey COlor
imagecolortransparent($im, $index2);
$imgname2 = “images/2011-04-20_09.01.51_latest_radaronly_zzz.gif”;
imagegif($im, $imgname2); // save image as gifimagedestroy($im);
print("origin image:
");
print("new image:
");
?>
This does make the grey (225,225,225) transparent, but it also makes the area that was transparent now white. Anyone have any ideas?