0

Python Wand open a img file as blob, md5 is incorrect.

with Image(filename=picture) as img:
    blob = img.make_blob()
    print 'blob md5', hashlib.md5(blob).hexdigest()
with open(picture, 'rb') as img:
    content = img.read()
    print 'content md5', hashlib.md5(content).hexdigest()

1 Answers1

1

.make_blob() method does not write the exactly same binary to its source file. Use .signature property instead if you want the signature of the image pixels, not file representation.

minhee
  • 5,688
  • 5
  • 43
  • 81