function generateMyImage($img, $sig, $target) {
$info = getimagesize($img);
$mime = $info['mime'];
$type = substr(strrchr($mime, '/'), 1);
$image_types = array('jpeg', 'png', 'gif', 'bmp');
if (!in_array($type, $image_types)) $type= 'Jpeg';
$img_create_func = 'ImageCreateFrom' . $type;
$dest = $img_create_func($img);
$src = imagecreatefromjpeg($sig);
$playW = imagesx($src);
$playH = imagesy($src);
$dH = $info[1] - $playH;
imagecopymerge($dest, $src, 0, $dH, 0, 0, $playW, $playH, 100);
imagegif($dest, $target);
imagedestroy($dest);
imagedestroy($src);
}
Title:
Making watermark by merge image
Description:
function generateMyImage($img, $sig, $target) { $info = getimagesize($img); $mime = $info['mime']; $type = substr(strrch...
...
Rating:
4