To find out if both images are identical, a simple binary comparison of the
Ideas exist.
"Mark R. Dawson" <MarkRDawson@discussions.microsoft.com> wrote in message
news:1C342CA7-4BB3-4B33-BD0B-BD3CCC42C769@microsoft.com...
> Hi AJ,
> if you want to compare two images based on the content of the image i.e.
> the value of the pixels you can either load the images into a bitmap
> structure and use the GetPixel method to compare the pixel value of each
> pixel in each image for equality. This could be slow for large images,
> since
> GetPixel is not very efficient, incase you want to make it faster then you
> should use the LockBits method of the Bitmap class. This will provide you
> with lightening quick scan time but you have to run it inside an unsafe
> region since it is accessing areas of memory, when you do that your
> program
> needs higher privileges to be installed, so that is something you need to
> consider.
>
> My basic algorithm would be something like:
>
> 1. Are the image dimensions the same -> if no, not equal, if yes keep
> going
> 2. Are image formats the same -> if no, not equal, if yes keep going
>
> 3. Foreach pixel compare values -> if not same, not equal, if same keep
> going
> 4. After all pixels compared and all equal then the images are the same.
>
> For more information on the LockBits method, see:
>
http://www.bobpowell.net/lockingbits.htm >
>
> Mark Dawson
>
http://www.markdawson.org >
>
> "AJ" wrote:
>
>> i am making a small application, which acts like a Messenger sort of
>> thing.
>>
>> As a part of it, there is a small module in which i need to implement
>> an image comparison.
>> am not quite sure of how to proceed.
>> any guidance in this regard would be well appreciated.
>>
>>
>> Thanx
>> AJ
>>
>>