Vampyre Imaging Library Forum

Imaging Category => Suggestions, Feature Requests, Contributions => Topic started by: carmas123 on 8 September 2009, 13:05:18

Title: Compare two TImagingBitmap
Post by: carmas123 on 8 September 2009, 13:05:18
Hi all, how i can compare very fast 2 TImagingBitmap for check if identical?

Thanks 2 all
Title: Re: Compare two TImagingBitmap
Post by: Galfar on 8 September 2009, 13:33:07
Since TImagingBitmap is basically regular VCL TBitmap, you can use
methods described here (http://stackoverflow.com/questions/1352312/what-is-the-fastest-way-to-check-if-two-tbitmaps-are-the-same) (scanline based one is better) or here (http://www.efg2.com/Lab/Library/Delphi/Graphics/CompareTBitmaps.TXT).

First check if width, height, and pixel formats match, then compare pixels if needed.

I'm planning image compare/diff functions for Imaging, but these will be for native Imaging image types (TImageData, TMultiImage, etc.), not TBitmaps.