I am attempting to make a dynamic image with PHP, and I can't find out how to set partial transparency. It is very easy to make things either solid or fully transparent, but I have been unable to do this.
+1
A:
Assuming you're creating your image with the imagecreatetruecolor function and that you're outputting the image as a PNG file....
You need to call the following methods to specify that the image must be generated as a 24-bit PNG before calling imagepng:
imagesavealpha($im, true);
Note that Internet Explorer 6 doesn't support 24-bit PNG files without the use of a CSS filter applied to the img tag.
Jon Benedicto
2009-04-13 20:39:27
A:
Check out the documentation for imagecolorallicatealpha() There they create a transparent color circle.
Ólafur Waage
2009-04-13 20:56:26