i am using this code to create watermark.
$image = \'1.jpg\'; $overlay = \'stamp.png\'; $opacity = \"20\"; if (!file_exists($image)) {
Have you tried using imagecopyresampled()? http://php.net/manual/en/function.imagecopyresampled.php