So I’m using Word.Interloop and in order to compare two pics, I guess I have to transform the current picture(in word file) to a bitmap image and then compare it with a bitmap image object from desktop?
Or perhaps the is a simpler way to do so?
Word.InlineShape x;
x.isEqual( Picture from Desktop/ bitmapImage.Object);
I have made a small sample showing how this can be accomplished. The main idea is to represent your image from your desktop as a
Bitmapinstance and then compare it pixel by pixel to theBitmapinstance in your document. The comparison is done by first copying an inline shape to the clipboard, then turning it into aBitmap, and then compare it with the reference (from the desktop) – first by size and then pixel by pixel.The sample is implemented as a C# console application using .NET 4.5, Microsoft Office Object Library version 15.0, and Microsoft Word Object Library version 15.0.
References:
http://www.c-sharpcorner.com/uploadfile/prathore/image-comparison-using-C-Sharp/