I have 2 visually identical images, one is saved on local machine as a golden image and 2nd one is taken during test execution to be compared with the golden image and mark the result as pass if they are identical. I have used PIL and filecmp to do this, but sometimes (since I do ssh to a remote server, take the screenshot and then bring it to the local machine,using sftp,for comparison) the md5sum changes and the test fails, although the images are visually identical. Is there any other way to compare content of 2 images? The format of the files are png and each is about 8MB. Is there a way to ignore the md5sum in the PIL lib? Any suggestion is appreciated.
Asked
Active
Viewed 20 times
0
-
How do you take a screenshot of an image file using SSH? Did you mean RDP or VNC? Those tools usually compress screen frames to speed up transfer and you will end up with a different image. – Selcuk Aug 06 '20 at 00:12
-
I SSH to an OS on the remote server which has a native screenshot command, when I transfer the files 2 images are visually identical and file sizes are exactly the same but I still get the different md5sum and the comparison fails – Mahyar Sedigh Aug 06 '20 at 00:50
-
It is pretty close, need to understand how to skip the gray-scale conversion and still use that method. Since I need to verify color of images too. Thanks for the link @Selcuk – Mahyar Sedigh Aug 06 '20 at 01:53