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++)
{
try
{
Bitmap img2 = new Bitmap(fileInfo[i].FullName);
IntPtr img2intptr = img2.GetHbitmap();
CompareBitmaps(imgintptr, img2intptr);
img2.Dispose();
}
catch (Exception excep) { throw excep.InnerException; }
}
Exception object: External component through an exception.
InnerException: Object reference not set to an instance of an object.
[/list][/list]