Assuming I have an image, how do i loop over the pixels of that image to get the number of pixels with a particular color for example black. I have tried canvas but did not work in react for some reason. What is the best way to do this in react, Is there a package I can maybe use for this purpose ? I am a beginner to these image processing stuff.