Free Support Forum - groupdocs.com

Pixel by Pixel image Comparison


#1

Hi,
Can we compare Pixel by Pixel using Groupdocs.Compare


#2

@kranthireddyr,

We’re investigating this. Your investigation ticket ID is COMPARISONNET-1911. As we have any further update, we’ll notify you.


#3

@kranthireddyr,

API performs pixel to pixel comparison inside when image is divided on lines. What are the results that you are expecting? Could you please share more details (sample and resultant files)?


#4

@atirtahir3

Please find the attached source and Target & Result(expected) image Sample_1.zip (2.2 MB)
Sample_2.zip (2.2 MB)


#5

@kranthireddyr,

We’re investigating this. You’ll be notified about the outcomes soon.


#7

@kranthireddyr,

Please see this screenshot - image comparison output.jpg (453.5 KB).
API starts image comparison with the upper left corner and compares the entire image pixel by pixel. If the pixels are same, it moves on to the next one and so on until it finds difference. The changed pixels are given an ID. It is defined as dabbed, deleted or changed. They are highlighted in a specific color (blue, red or green according to the standard settings).
Using this code you can compare images successfully:

//Apply license firstly
//set detail level
DetailLevel zonesDetailLevel = DetailLevel.Hight; //heigh, low, middle
ComparisonSettings settings = new ComparisonSettings();
settings.DetailLevel = zonesDetailLevel;
settings.UseFramesForDelInsElements = true;
settings.DeletedItemsStyle.FontColor = Color.Green;
settings.StyleChangedItemsStyle.FontColor = Color.Red;
ICompareResult compareResult = null;
Comparer comparer = new Comparer();
compareResult = comparer.Compare(source path/file, target file/path, settings); 
string resultPath = @"D:\GroupDocsTesting";
if (!Directory.Exists(resultPath)) Directory.CreateDirectory(resultPath);
compareResult.SaveImages(resultPath);