Sorry for that here is the contents of the link,
Are you using "Pixels" or "Scanline" for your comparisons?
Scanline will be much faster.
Look at the various "Comparison" links on this page:
You could use this SysUtils routine to compare two scanlines a bit faster.
function CompareMem(P1, P2: Pointer; Length: Integer): Boolean;
The addresses of scanlines can be increasing or decreasing so you usually can't use CompareMem for
the whole image. See "Copying Raw Data to Scanline Area" in the "Optimization" section of the
Scanline Tech Note:
Also in that technote are some examples of accessing the Scanline data using assembly language.
If you were storing images for later comparison, I think I'd compute and store the CRC-32 of each
image. If two images are the same size and PixelFormat, and have the same CRC-32, there's a very
small chance (like one in 4 billion) that they are really different. If the CRCs are different,
then the images are definitely different. Comparing two CRCs is simply the comparison of two
integers and would be very fast (once the CRC is computed).
--
efg -- Earl F. Glynn, Overland Park, KS USA
efg's Computer Lab Mirror: