title: PHP watermark with imagecopyresampled function
body: <p>Is it possible to make a watermark effect on images with <code>imagecopyresampled</code> function instead of the <code>imagecopy</code> function?</p>
  
  <p>My research didn't land on good examples, so if someone can respond to my question I will be very thankful.</p>
  
  <pre><code>list($width, $height) = getimagesize($path);
  $src = imagecreatefromjpeg($path);
  $temp = imagecreatetruecolor($newwidth, $newheight);
  imagecopyresampled($temp, $src, 0,0,0,0, $newwidth, $newheight, $width, $height);
  imagejpeg($temp, $path,100);
  imagedestroy($temp);
  </code></pre>