difference.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Automate-it 作者: PacktPublishing 项目源码 文件源码
def differnce_images(path_one, path_two, diff_save_location):
    image_one = Image.open(path_one)
    image_two = Image.open(path_two)

    #Difference calculated here
    diff = ImageChops.difference(image_one, image_two)

    #Method to check if there is no difference
    if diff.getbbox() is None:
        print "No difference in the images"
        return
    else:
        print diff.getbbox()
        diff.save(diff_save_location)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号