python:用python来找不同

from PIL import Image,ImageChops
image1=Image.open("C:/Users/wantao/Desktop/qq截图/python/33.png")
image2=Image.open("C:/Users/wantao/Desktop/qq截图/python/44.png")
difference=ImageChops.difference(image1,image2)
if difference.getbbox()==None:
print("我们都一样")
else:
difference.save("C:/Users/wantao/Desktop/qq截图/python/differnce.png")



原文地址:https://www.cnblogs.com/wantao/p/8431199.html