I currently run a popular website and need to be able to use PHP in order to produce signatures for each user. I have been learning image manipulation and things from the gd library for PHP - and am able to load images from files and add text .etc
However, my problem is that I need to load two files - for example, background.png and icon.png - and then combine them so they become one image. The background.png will obviously be the base of the image, and then I need the icon.png image to be loaded and placed on top of the background - at a certain position (lets say, at 120,100).
This is the only thing I cannot seem to achieve - I've searched google, I've search through the php.net pages and gd library website, and I've asked on other forums (however nobody seems to want to help me). I really do hope you can help me!
If you want to base any solutions around the following code, then feel free. The below code works fine, it's just being able to load another png file which I don't know how to do.
<?php
header("Content-type: image/png");
$im = imagecreatefrompng("background.png");
imagepng($im);
imagedestroy($im);
?>
Thanks a lot 🙂