FAST color counting of a pixmap.

BlitzMax Forums/BlitzMax Beginners Area/FAST color counting of a pixmap.

How about
a) Create Type 'Pixel_colour' with fields argb, (possibly a,r,g,b) and count
b) Create a TMap.
c) Readpixel
d) Check whether there is a TMAP entry for string(argb)
e) If not, create a map entry with a new pixel_colour indexed to string(argb)
f) Repeat from c).
<edit> Took out code as didn'treally see Azathoth's post.