PHP/Graphics Image/Water Mark
Версия от 10:37, 26 мая 2010; (обсуждение)
Water mark Effect
<?php
$myImage = imagecreatefromgif("largewbexLogo.GIF");
$myCopyright = imagecreatefrompng("logo.png");
$destWidth = imagesx($myImage);
$destHeight = imagesy($myImage);
$srcWidth = imagesx($myCopyright);
$srcHeight = imagesy($myCopyright);
$destX = ($destWidth - $srcWidth) / 2;
$destY = ($destHeight - $srcHeight) / 2;
$white = imagecolorexact($myCopyright, 255, 255, 255);
imagecolortransparent($myCopyright, $white);
imagecopymerge($myImage, $myCopyright, $destX, $destY, 0, 0, $srcWidth, $srcHeight, 50);
header("Content-type: image/jpeg");
imagejpeg($myImage);
imagedestroy($myImage);
imagedestroy($myCopyright);
?>