title: Using a transparent PNG as a clip mask
body: <p>Is it possible to take this image:</p>
  
  <p><a href="https://i.stack.imgur.com/fAfG4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fAfG4.png" alt="image1"></a>
  </p>
  
  <p>And apply this mask:</p>
  
  <p><a href="https://i.stack.imgur.com/uFqsK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFqsK.png" alt="mask"></a>
  </p>
  
  <p>And turn it into this:</p>
  
  <p><a href="https://i.stack.imgur.com/OK1fX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OK1fX.png" alt="image2"></a>
  </p>
  
  <p>Using either GD or Imagick? I know it's possible to mask an image using shapes but I'm not sure how to go on about doing it with a pre-created alphatransparent image. :s</p>