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

 

 


 


posted @ 2018-02-08 13:50  Saruka的男朋友  阅读(862)  评论(0编辑  收藏  举报