📅  最后修改于: 2022-03-11 14:45:51.385000             🧑  作者: Mango
In [1]: import Image
In [2]: import hashlib
In [3]: im = Image.open('foo.jpg')
In [4]: hashlib.md5(im.tostring()).hexdigest()
Out[4]: '171e2774b2549bbe0e18ed6dcafd04d5'