Welcome to WebmasterWorld Guest from 188.8.131.52
I am trying to write a code that can pick a watermark image, gif/png/jpeg, and put it on a destination image,gif/png/jpeg, with transparancy.
For the watermark I created an image in photoshop with transparent background. Now the script works fine but it shows rough white edges around the watermark image. Also is it possible to alpha the watermark image so that we can see through it ? i.e the destination image is visible through it?
here is my code
$image = imagecreatefromstring(file_get_contents("jack-tank.jpg"));
$w = imagesx($image);
$h = imagesy($image);
// Load the watermark image
$watermark = imagecreatefromgif('dil.gif');
$ww = imagesx($watermark);
$wh = imagesy($watermark);
// Merge watermark upon the original image
imagecopy($image, $watermark, $w-$ww, $h-$wh, 0, 0, $ww, $wh);
// Send the image
if you know any class or code snippet please share.
1) i made a watermark image in photoshop with transparent background.
2) when I display it on the page, it works with transparency with imagecopymerge() however the white-rough-edges are still there.
How can I remove the white-rough/crude edges of the watermark. it is not seamless.