title: how to fill a image with pattern
body: <p>let's say i have a image !
  <img src="https://i.stack.imgur.com/4jiSz.png" alt="enter image description here"></p>
  
  <p>now i want to fill that image with <img src="https://i.stack.imgur.com/BooMu.png" alt="enter image description here"></p>
  
  <p>and my final image should look like this<img src="https://i.stack.imgur.com/BWQt1.png" alt="enter image description here"></p>
  
  <p>how to do it?
  so far i was able to change the color of that image but was not able to fill pattern.</p>
  
  <p>can i do it with html5 canvas (pattern)? is there any way to do it with php or any web platform. </p>