Hi, im having some problem placing an image on top of a black background...
the image just displays as black...
Heres my code so far...
//notes
/*
$size is generated using getimagesize()
and $ret is the ratio i want to resize to...
a maximum of 200 px wide
a maximum of 170 px high
$the_height is retrieved from $_GET['h']
$the_width is retrieved from $_GET['w']
$theimage is retrieved from $_GET['loc']
*/
//code
$final = imagecreatetruecolor($the_width, $the_height);
$thumb = imagecreatetruecolor($ret[0], $ret[1]);
$black = ImageColorAllocate($final, 0, 0, 0);
imagefill($final, 0, 0, $black);
$image = imagecreatefromjpeg($theimage);
@imagecopyresized($thumb, $image, 0, 0, 0, 0, $ret[0], $ret[1], $size[0], $size[1]);
$dest_x = $size[0] - $the_width / 2;
$dest_y = $size[1] - $the_height / 2;
//merge ontop of bg
imagecopy($final, $thumb, $dest_x , $dest_y, 0, 0, $ret[0], $ret[1]);
imagejpeg($final,'',80);
imagedestroy($image);
imagedestroy($thumb);
imagedestroy($final);
Many thanks in advanced