Please view the source file
Note: GD 2.0 or above is required to have a transparent effect
(as the current mainstream development language)
header ("Content-type: image /png");
$logoImage = ImageCreateFromPNG(test.png);
$photoImage = ImageCreateFromJpeg(back.jpg);
ImageAlphaBlending($photoImage, true);
$logoW = ImageSX( $logoImage);
$logoH = ImageSY($logoImage);
ImageCopy($photoImage, $logoImage, 0, 0, 0, 0, $logoW, $logoH);
ImageJPEG($photoImage) ; // output to browser
ImageDestroy($photoImage);
ImageDestroy($logoImage);
?>