title: Finding non transparent filled areas in images on javascript canvas
body: <p>I've an image with some filled circles, rectangles etc. I want to find x1,x2, y1, y2 areas of filled areas.</p>
  
  <p><a href="https://stackoverflow.com/questions/23255825/javascript-method-to-detect-area-of-a-png-that-is-not-transparent">Javascript Method to detect area of a PNG that is not transparent</a></p>
  
  <p>Accepted answers works fine but i need to find each areas separately. As in the image below, i need thee x1, x2, y1, y2 positions. Do you have any ideas?</p>
  
  <p><img src="https://i.stack.imgur.com/2XaZw.png" alt="enter image description here"> </p>