im trying to add a shadow to my image generator it generates png transparent bg by telling it font color, font size and text.
i dunno how to add shadow to the image
Added after 56 minutes:
just realised it may help if i post my code
i dunno how to add shadow to the image
Added after 56 minutes:
just realised it may help if i post my code
PHP Code:
<?php
header("Content-type: image/png"); //Picture Format
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache"); // NO CACHE
$size = imagettfbbox($_GET['size'], 0, $font,$_GET['text']);
$bg = imagecreatetruecolor($xsize, $ysize); //create Image of size 350px x 75px
imagesavealpha($bg, true); //This will make it transparent
$trans_colour = imagecolorallocatealpha($bg, 0, 0, 0, 127);
imagefill($bg, 0, 0, $trans_colour);
$color = ImageColorAllocate($bg,$r_txt,$g_txt,$b_txt);
imagettftext($bg, $_GET['size'], 0, abs($size[0]), abs($size[5]), $color, $font, $_GET['text']); //Writes text to the image using fonts using FreeType 2
imagepng($bg); //Create image
ImageDestroy($bg); //destroy image
?>
Comment