I'm trying to watermark images as they are uploaded by a PHP script. Unfortunately, the output quality of the watermark is very poor.
Here is the script I'm using:
Code:
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg("originalimage.jpg");
imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
$overlay=imagecreatefrompng("../watermark.png");
$x=$newwidth-240;
$y=$newheight-38;
imagecopymerge($thumb,$overlay,$x,$y,0,0,$newwidth ,$newheight,60);
imagejpeg($thumb,"output.jpg",100);
Am I doing anything wrong? Guide
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --