Hi all
i am having a small problem with my dynamic output code to produce a signature in php
the signature comes out fine with text but when i add another .png image to add ontop of the main signature i get a black background when i would like it transpearent to show like a users avatar.
my current code to output the signature:
header('Content-Type: image/png');
$im = @imagecreatefrompng('sigs/1.png') or die("Cannot select the correct image. Please contact the webmaster.");
$text_color = imagecolorallocate($im, 197,197,199);
$text_color_red = imagecolorallocate($im, 247,34,6);
$text_username = "$username";
$text_mypoints = "Points: ".numberFormat($mypoints)."";
$text_mypoints1 = usersmypoints($id);
$text_membertitle = "Member:";
$text_totalposts = "Total Posts:";
$text_totalposts_value = totalposts($id);
$text_url = "http://";
$outer = "../images/ranks/$tmp.png";
$src = @imagecreatefrompng($outer);
$font = 'sigs/arial.ttf';
imagettftext($im, 8, 0, 171, 30, $text_color, $font, $text_membertitle);
imagettftext($im, 12, 0, 216, 30, $text_color, $font, $text_username);
imagettftext($im, 8, 0, 160, 47, $text_color, $font, $text_totalposts);
imagettftext($im, 12, 0, 216, 47, $text_color, $font, $text_totalposts_value);
imagettftext($im, 7, 0, 15, 72, $text_color, $font, $text_url);
imagettftext($im, 10, 0, 10, 95, $text_color_red, $font, $text_mypoints);
imagettftext($im, 10, 0, 320, 95, $text_color, $font, $text_mypoints1);
imagecopymerge($im, $src, 287, 20, 0, 0, 75, 71, 100);
imagepng($im);
imagedestroy($im);
the below is the inner image on top of the main generated image
$outer = "../images/ranks/$tmp.png";
$src = @imagecreatefrompng($outer);
i would like this to show in transparency
thankz