Reputation: 13
I am trying to compare two images with available npms in protractor. Tried with "image-diff" npm and found no solution. when i tried with the given sample code in the npm it is not showing any result . Below is the sample code which i tried
imageDiff({
actualImage: 'D:\\imageRecognition\\picA.png',
expectedImage: 'C:\\Users\\admin\\Desktop\\picB.png',
diffImage: 'D:\\imageRecognition\\result.png',
}, function (err, imagesAreSame) {
console.log("diffrence between images ================> "+ imagesAreSame);
});
the parameter 'imagesAreSame' should return a boolean value whether the images are same or not but it is not showing any effect. Can somebody help to get out of this. Thanks in advance
Upvotes: 0
Views: 172
Reputation: 346
image-diff depends on ImageMagick. "Please install this before continuing." Is the advice they give. So I suggest following their advice.. In terms of the version to use...
Suggested version: ImageMagick-6.9.3-4-Q16-x64-dll.exe - Win64 dynamic at 16 bits-per-pixel
Reason: Its the highest resolution they support, if you want the highest accuracy this is the one to go for. Its also suitable for windows 64bit operating system. This is the system you are using
Upvotes: 1