Take and save photo with an overlay image

Hello, I need to display an image overlaying the camera image and saving the photo with that image. I can already display the image with the camera using the camera preview plugin, but how can I save the two together as a frame?