Hi
i wrote this script to add a watermark image into the bottom right a larger image. Its very basic i know but its all i need for now. It also is an easy function for noobs to grasp. It just takes an two image types as arguments
for example
$image = imagecreatefromjpeg("FILELOCATION");
$insert = imagecreatefrompng("WATERMARKFILELOCATION");
$image = image_overlap($image, $insert);
function image_overlap($background, $foreground){
$insertWidth = imagesx($foreground);
$insertHeight = imagesy($foreground);
$imageWidth = imagesx($background);
$imageHeight = imagesy($background);
$overlapX = $imageWidth-$insertWidth-5;
$overlapY = $imageHeight-$insertHeight-5;
imagecolortransparent($foreground,
imagecolorat($foreground,0,0)); imagecopymerge($background,$foreground,
$overlapX,$overlapY,0,0,$insertWidth,$insertHeight,100); return $background;
}
It doesnt smooth the edges between the two images but it works easily.