Well, the best way would be to directly decode original picture, and scanned one, into some sort of pixel matrix, and compare them... Since I have absolutely no idea how to decode images into plain pixels, I'll post the way I'd do it...
Use two Picture boxes, let's name them Picture1 and Picture2... Load original picture into Picture1, and scanned one into Picture2... Now, what you need to do, is set picture boxes' properties, autosize to true, and autoredraw to true, and scalemode to pixel..
Next, your code would look something like this:
CODE
Dim x1 As Long, y1 As Long ' *** Picture1 Coordinates
For x1 = 0 To Picture1.ScaleWidth
For y1 = 0 To Picture1.ScaleHeight
If Picture1.Point(x1,y1) <> Picture2.Point(x1,y1) Then
' *** Do whatever you need to do if pixels are different
Else
' *** Do whatever you need to do if pixels are the same
Endif
Next y1
Next x1
I believe this would work, but don't take my word for it... This would be the basic concept, which ofcourse assumes that two images have the same dimensions... This metod is slower than the method I described, where you would compare matrices of two pictures...
If this works, let me know... Or if you have any more questions... Ask them here, or drop me a PM...
Reply