Jump to content
php.lv forumi

logo ieksh image


p4F

Recommended Posts

<?
function logotoimg($wm,$src,$dst)
{
$watermark = imagecreatefrompng($wm);
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);
$image = imagecreatetruecolor($watermark_width, $watermark_height);
$image = imagecreatefromjpeg($src);
$size = getimagesize($src);
$dest_x = $size[0] - $watermark_width - 5;
$dest_y = $size[1] - $watermark_height - 5;
imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100);
imagejpeg($image,$dst);
imagedestroy($image);
imagedestroy($watermark);
}
?>

Edited by marcis
Link to comment
Share on other sites

×
×
  • Create New...