Page 1 of 1

CompareBitmaps through error

Posted: Fri May 10, 2013 2:33 pm
by aja
I have one source file and 5K target files for image comparison.But after
comparison of 533 images.Image comparison method through exception.

Below is my code:

Code: Select all

IntPtr imgintptr = img1.GetHbitmap();
                for (int i = 0; i < fileInfo.Count(); i++)
                        Bitmap img2 = new Bitmap(fileInfo[i].FullName);
                        IntPtr img2intptr = img2.GetHbitmap();
                        CompareBitmaps(imgintptr, img2intptr);
                    catch (Exception excep) { throw excep.InnerException; }


Exception object: External component through an exception.
InnerException: Object reference not set to an instance of an object.


Posted: Mon May 20, 2013 6:46 pm
by Gemini
Could you write to and describe the problem?