// Save the image to file and free memoryimagepng($im, 'photo_stamp.png');imagedestroy($im);

?>

This example uses imagecopymerge() to merge the stamp
with our original image. Using this we can set the opacity of our stamp -
in our example we've set it to 50% opacity. In practice this would be useful
in copyright protection as semi-transparent watermarks are hard to remove
yet allow viewers to see the image.