0

Python Wand 将 img 文件作为 blob 打开,md5 不正确。

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()
4

1 回答 1

1

.make_blob()方法不会将完全相同的二进制文件写入其源文件。.signature如果您想要图像像素的签名,而不是文件表示,请改用属性。

于 2014-01-24T02:57:02.417 回答