Hi I am using following code to make the a color transparent in an image.
Code:
<?php
header ("Content-type: image/png");
$im = imagecreate(500, 400);
$bgc = imagecolorallocate($im, 0, 0, 0);
$tc = imagecolorallocate($im, 255, 255, 255);
imagettftext($im, 20, 10, 100, 200, $tc, "/arial.ttf",$text);
imagecolortransparent($im, $bgc);
imagepng($im,"images/test.png");
imagedestroy($im);
?>
What I am getting is an image with black background with white text. I want to remove the black background.
Can any body help me with this?
Tanks a ton in advance.
Kevin.