Basically, I want to get the most common ARGB value that appears in a BitmapData
. That is, I want to know which exact pixel colour is the most abundant in the image. I tried going through every pixel of the image and counting whenever a colour that already exists comes up, but that's way too slow, even with relatively small images. Does anybody know a faster method for this, maybe using the BitmapData.histogram()
function or something?
Ideally the process should be near instantaneous for images around at least 1000x1000 pixels.