title: Add watermark to image with imagick PHP
body: <p>I'm adding <code>watermark.png</code> to <code>original.png</code>, but I have 3 problems:</p>
  
  <ol>
  <li>I want to set <code>watermatk.png</code> on the bottom right</li>
  <li>I want to resize <code>watermark.png</code> and make it smaller or bigger</li>
  <li>Is there any way to make watermark transparent if background was white?</li>
  </ol>
  
  <hr>
  
  <pre><code>&lt;?php
  // Open the original image
  $image = new Imagick();
  $image-&gt;readImage("./man/original.png");
  
  // Open the watermark
  $watermark = new Imagick();
  $watermark-&gt;readImage("./man/watermark.png");
  
  // Overlay the watermark on the original image
  $image-&gt;compositeImage($watermark, imagick::COMPOSITE_OVER, 0, 0);
  
  // send the result to the browser
  header("Content-Type: image/" . $image-&gt;getImageFormat());
  echo $image;
  </code></pre>