On application startup I build a cache of icons (24x24 32bbp pre-multiplied argb bitmaps). this cache contains roughly a thousand items. I don't want to store the same image multiple times in this cache, for both memory and performance reasons. I figured the best way would be to create some sort of crc from each bitmap as it goes into the cache, and to compare new bitmaps against this list of crcs.
What is a good (and fast) way to create a crc from a bitmap which is only loaded in memory?
Or am I totally on the wrong track and is there a better way to build a bitmap-cache?