Canvas pix color

I want to make a list of all the white pixels in canvas but it takes a long time.

Depending on the resolution of the phone and the size of the canvas there may be millions of pixels to test so it will take a long time.