I think there are algorithms for this kind of thing, like building a histogram, which should be much faster. Counting colors should be pretty quick to do.
FAST color counting of a pixmap.
BlitzMax Forums/BlitzMax Beginners Area/FAST color counting of a pixmap.The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.