Python Wand打开img文件为blob,md5不正确。这是魔杖的错误吗?

时间:2013-11-26 03:34:51

标签: wand

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

1 个答案:

答案 0 :(得分:1)

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