<?php
header('Content-type: image/jpeg');
$image1='format.jpg';
$image2='qr_sample.png';
list($width, $height) = getimagesize($image2);
$image1 = imagecreatefromstring(file_get_contents($image1));
$image2 = imagecreatefromstring(file_get_contents($image2));
// imagecopymerge(dst_im, src_im, dst_x, dst_y, src_x, src_y, src_w, src_h, pct)
imagecopymerge($image1, $image2, 280, 180, 0, 0, $width, $height, 100);
// display img in browser
imagepng($image1);
// save image on server
// imagejpeg($image1,"trial.jpg");
?>
Comments
Post a Comment