PHP GD Library - How to add two images to make one.?

  • Thread starter Thread starter TACTICS
  • Start date Start date
T

TACTICS

Guest
I am wondering how to add an image on top of another image using PHP GD Library. So far I have the following, though it does not work:
<?php
blah blah blah... other code(below is the main part to look at)
//Image on top
$overlay = 'gamerpic.php';
//Background
$image = imagecreatefrompng('kjigd3.png');
//Image on top
$oimg = imagecreatefrompng($overlay)
//Output
imagettftext($oimg, 20, 0, ($img_w/2 - $pos_activity[2]), 50);

it does not work though :(
$overlay = 'gamerpic.php'; (another GD image)
 
Back
Top