p4F Posted December 1, 2007 Report Share Posted December 1, 2007 kr4 vai kādam ir skripts piem ir image.jpg un es gribu ieskhā tajā ielikt logo.jpg? Vai varat pateikt kaa saucas ši funkcija? Link to comment Share on other sites More sharing options...
marcis Posted December 1, 2007 Report Share Posted December 1, 2007 (edited) <? 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 December 1, 2007 by marcis Link to comment Share on other sites More sharing options...
Recommended Posts