PIL ImageChops.difference not working correctly(?)

Jon Reyes everystepsayes at gmail.com
Tue Feb 19 06:49:09 CET 2013

I have two images generated from ImageMagick that I need to compare through PIL but when I compare them it says that the two images aren't identical. I tried viewing the supposed "difference" but all I see is a black image which means the two image are identical. ImageChops even returns the region where the supposed non - identical marks are, but there's nothing there. Any thoughts?

I just do this to compare if the two images are identical:
diff = ImageChops.difference(img1, img2)
if diff.getbbox() == None:
    #then the images must be the same

More information about the Python-list mailing list