purpleflame
New Member
- Messages
- 17
- Reaction score
- 0
- Points
- 0
So I am trying to use a php code to make a png image that has a transparent background with a sentence written on it. So far I have a transparent png image of the size I want and the code below. The only problem I have is that the background color comes out as black and not transparent. I am sure I have overlooked something really simple. If anyone can help, I would appreciate it. Thank you.
Address: http://purpleflame.exofire.net/phptests/textimagetest.php
PHP:
<?php
header("Content-type: image/png");
$string = "Working";
$im = imagecreatefrompng("http://i271.photobucket.com/albums/jj149/violetvalor/075400.png");
$txtcolor = imagecolorallocate($im, 102, 51, 153);
imagestring($im, 3, 3, 3, $string, $txtcolor);
imagepng($im);
imagedestroy($im);
?>