[Image-SIG] error in ImageChops.logical_xor ???
fredrik at pythonware.com
Wed Oct 5 21:23:05 CEST 2005
"john taylor" wrote:
> i want to compare two images, they are of the same
> mode ('RGB'), same format ('BMP'), same size, etc.
here's a reasonably fast way to compare two images:
def compare(im1, im2):
if im1.mode != im2.mode or im1.size != im2.size:
return ImageChops.difference(im1, im2).getbbox() is None
return im1.tostring() == im2.tostring()
I think the logical operators (which are undocumented) only work on
mode "1" images.
More information about the Image-SIG