Saturday, 3 May 2014

Merge images using php

Iam explain about how to merge images using php
The following lines of code is used to merge images.
header('Content-Type: image/jpeg');

$backgroundimage = imagecreatefromjpeg('tshirt.jpg');
$overlayimage= imagecreatefrompng('Buy-Now.png');

imagecopy($backgroundimage, $overlayimage, 100, 200, 0, 0, 130, 40);
imagejpeg($backgroundimage, null, 100); 

Before merge Images:

After merge the Images:

No comments:

Post a Comment