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")