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 =
我想使用imagemagick魔杖包將PDF文件的所有頁面轉換爲單個圖像文件。我雖然具有下列麻煩(見下面的註釋其中的突出問題) import tempfile
from wand.image import Image
with file('my_pdf_with_5_pages.png') as f:
image = Image(file=f, format='png')
我正在嘗試使用Wand(http://docs.wand-py.org/en/0.3.5/)庫來轉換圖像服務器端。 我在我的Ubuntu服務器上安裝了libmagickwand-dev。 我可以以JPG和PNG圖像工作,但我得到一個錯誤消息,當試圖改變一個WEBP圖片: no decode delegate for this image format `' @ error/blob.c/BlobT