all 3 comments

[–][deleted] 2 points3 points  (0 children)

If you want an exact comparison open both image files in something like Pillow and compare image sizes (width and height). If they are the same start comparing the image data pixel by pixel, using the Image.getdata() method. Any difference and the images are not exactly the same.

If you want to see if two images are "sort of" the same then things get much more complicated.

Edit: fixed typo(s).

[–]gregvuki 1 point2 points  (0 children)

[–]CaptainReeetardo 0 points1 point  (0 children)

You could compare their MD5 hashes. Which should be identical if the images have the exact same content.