Blake Winton wrote: > Logan Shaw wrote: > >> Now, we can assume that rowbytes is never smaller than width * pixelsize. >> If it were smaller, then the data would not fit!
> Can we? What about compressed bitmaps? I could be wrong, of course, but I assume that rowbytes isn't defined for compressed images. Regardless, I was actually talking about the subset of bitmaps which are not compressed. Comparing compressed bitmaps is a whole different game. For example, in theory, you could have two bitmaps with different pixel data and different compression types, but the compressed data could be the same. (Or, at least I have not seen proof that this cannot happen.) Or you could have bitmaps with identical pixel data but different compression formats and different compressed data. Or you could even have two compressed bitmaps that use the same compression type and have the same pixel data but have different compressed data! This type of thing can happen when a newer version of an algorithm is tweaked to use the same format but increase the compression algorithm slightly, or when a different time/space tradeoff parameter is chosen for the same algorithm. In the real world, this really happens with the deflate algorithm. I don't know details of the compression algorithms that Palm OS uses, but I haven't seen any guarantee that there can't be variations in the compressed output from the same uncompressed input even with a single algorithm. So, the obvious way to compare two compressed bitmaps would be to decompress them, then compare. It would be very difficult to do anything else and be sure it's a correct implementation. - Logan -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
