title: How do I crop an image based on custom mask in python?
body: <p>Below I have attached two images. I want the first image to be cropped in a heart shape according to  the mask image (2nd image).</p>
  <p>I searched for solutions but I was not able to get the simple and easier way to do this. Kindly help me with the solution.</p>
  <p>2 images:</p>
  <ol>
  <li><p>Image to be cropped:
  <a href="https://i.stack.imgur.com/9TKDr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9TKDr.jpg" alt="enter image description here" /></a></p>
  </li>
  <li><p>Mask image:</p>
  </li>
  </ol>
  <p><a href="https://i.stack.imgur.com/6B6Yu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6B6Yu.jpg" alt="enter image description here" /></a></p>