Click here to Skip to main content
14,603,886 members
Rate this:
Please Sign up or sign in to vote.
i have two images and i need to compare them then i need to get all pixels of first image which are not same in second image.
if half of image 1 is same as image 2 so i want the half of image 1 which is different from image 2.
Updated 7-Jun-14 16:55pm
Dave Kreskowiak 7-Jun-14 16:59pm
Permission granted! Please, proceed.

Or did you forget to ask a question?
ZurdoDev 7-Jun-14 21:48pm
You'll need to search for a 3rd party control to do that. I do not believe .Net can do that built-in.
gggustafson 7-Jun-14 22:14pm
Are the images the same size? Are they color or B/W?
Did you notice that your problem is not fully defined. You did not define what to do with matching pixels and different pixels.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question.

One of the way to perform necessary calculations is using System.Drawing, more exactly:[^].

There are some code samples on the pages of each of these methods, just to understand how to use them. Most important thing here is not to use GetPixel/SetPixel as those method would work prohibitively slowly for your purpose.

Mohammed Nabeel Khan 9-Jun-14 15:47pm
thanx Sergey Alexandrovich but i need to do it faster. i know i can do it with bitmapData class much faster but how to get the difference ? should i compare every pixel? isn't there any bitwise operation i can do with bytes like And or Nand?
Mohammed Nabeel Khan 9-Jun-14 15:58pm
Sir is there you peoples culture to degrade other people?
this is my third question and God knows that except for demotivating me, you your friends have not helped me.
With respect sir, i might not be a good programmer but i put my best efforts in it.
Well thanks for your demotivation, Sergey Alexandrovich.
M Nabeel Khan

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100