Link to home
Start Free TrialLog in
Avatar of davidlars99
davidlars99Flag for United States of America

asked on

compare two images pixel by pixel

how is it possible to compare two images and tell in what areas they're different..?
Avatar of S-Twilley
S-Twilley

Sorry about the delay in helping with this...

Just wanted to check really... you want to check every single pixel... or possibly a set area?

Also, is this like a one off comparison of two images... or will it be continuous checking of a new Image... and the last image... like if you were captuing a webcam image, and wanted to monitor for a change (especially in this case, you may want to limit the number of pixels)
Avatar of davidlars99

ASKER

thanks Steve, you can give me all you can and I'll start researching by myself then, just put me into right direction...  :)
ASKER CERTIFIED SOLUTION
Avatar of S-Twilley
S-Twilley

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
just a note:   this is assuming that you're not using a fixed pallete on the bitmaps, you should probably test for differing pallettes as well... but i was assuming that they're in true color
well   using LockBits is supposed  to be better than using GetPixel

http://www.bobpowell.net/lockingbits.htm

but I'm not sure about the Marshal.WriteByte part...   it's meant to be more efficient, but if you limit the number of comparisons, GetPixel shouldn't be too much of a resource hog
thanks Steve, I liked it