PHP GD Merge Image

This example shows how to merge images in php gd.

 
 

Share on Google+Share on Google+

PHP GD Merge Image

Ads

This example shows how to merge images in php gd.

<?php

$backgroundSource = "merge.jpg";

$feedBurnerStatsSource = "images.jpg";

$outputImage = imagecreatefromjpeg($backgroundSource);

$feedBurnerStats = imagecreatefromjpeg($feedBurnerStatsSource);

$feedBurnerStatsX = imagesx($feedBurnerStats);

$feedBurnerStatsY = imagesy($feedBurnerStats);

imagecopymerge($outputImage,$feedBurnerStats,156,50,0,0,$feedBurnerStatsX,$feedBurnerStatsY,100);

header('Content-type: image/jpeg');

imagejpeg($outputImage);

imagedestroy($outputImage);

?>

After running the program you will get the following output

Advertisements

Posted on: November 11, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles