hash python png

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'
Ugliest Unicorn