I believe that there are functions provided by GD (usually included in PHP installations) that can do just that.
For example, perhaps one of imagecopyor imagecopymerge, I would say.
See Example # 1 Combining two copies of the PHP.net logo with 75% transparency on the second page of the man page (citation):
<?php
$dest = imagecreatefromgif('php.gif');
$src = imagecreatefromgif('php.gif');
imagecopymerge($dest, $src, 10, 10, 0, 0, 100, 47, 75);
header('Content-Type: image/gif');
imagegif($dest);
imagedestroy($dest);
imagedestroy($src);
?>
There are also two examples that may prove useful: