1
Answer

How to evaluate image in word document using Interop c#

I have create one windows application in C#, where automating MsOffice.

In this application, there are n# of projects included. There is a separate project(C#), where automating MsOffice. Because of this, I dont want to use namespaces like, System.windows.forms.. etc.,

This application is created to test the candidate MsOffice skills. The application will ask the candidate to perform any task and then the application will evaluate the word document which was created by the candidate. Based this, candidate will get the score.

Now, I want to create a method to evaluate the picture(specific image inserted with its required height/width) added in word document by the candidate.

In this method, I dont want to save image any where but i just want to compare with the image already given in the folder to the candidate.

I have already searched on google, Ref:
Compare picture in Word file and in a folder?

programmatically comparing word documents

extract image from word file

Extracting Images from doc file in c# using using Microsoft.Office.Interop.Word;

I just want to compare the image in the word document with the image given in the folder to the candidate.

Please help me guys.

Thanks

Answers (1)

2
Photo of Mohamed Abedallah
NA 574 67 7y
Basically you need 2 steps: first extract the images from the Word file, then compare them to your other images.
For the first part, there's a good discussion in this forum:
https://forums.asp.net/t/1474743.aspx

Once you are able to obtain the images from the doc files, you can use a professional image processing library like LEADTOOLS to do the comparison. The following article explains some ways of comparing images with a project source code:
https://www.leadtools.com/blog/imaging/image-processing/compare-images-25-projects-25-days/