Home > Backend Development > PHP Tutorial > Add transparent watermark to pictures through gd library_PHP tutorial

Add transparent watermark to pictures through gd library_PHP tutorial

WBOY
Release: 2016-07-13 17:32:50
Original
1297 people have browsed it

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);
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508661.htmlTechArticlePlease view the source file Note: GD 2.0 or above is required to have a transparent effect? ​​PHP (as the current mainstream development language ) header ("Content-type: image/png"); logoImage = ImageCreateFromPNG(test.png);...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template