I am searching for a way to overlay an image on an existing image.
e.g:
+
You can do this using GD library. There is function to "merge" images called imagecopymerge.
Here is a very simple example how to merge images: