title: How to mask image with binary mask?
body: <p>Suppose I have a greyscale image here:</p>
  <p><a href="https://i.stack.imgur.com/RuXCZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RuXCZ.png" alt="enter image description here" /></a></p>
  <p>And a binary masked image here:</p>
  <p><a href="https://i.stack.imgur.com/SyD9T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SyD9T.png" alt="enter image description here" /></a></p>
  <p>With the same dimensions and shape. How do I generate something like this:
  <a href="https://i.stack.imgur.com/HCO4H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HCO4H.png" alt="enter image description here" /></a></p>
  <p>Where the values indicated by the 1 in the binary mask are the real values, and values that are 0 in the mask are null in the final image.</p>