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);
发现PHP出奇的强大和简单.
没有评论:
发表评论