pythonmagick

Resize GIF animation, pil/imagemagick, python

纵然是瞬间 提交于 2019-12-03 05:20:01
问题 I want to change size of GIF animation image using python and PIL or PythonMagick. I can't find solution. PIL and thumbnail method works for jpg and png but not for gif. ImageMagick has command mogrify/convert -resize '1280x1024>' but i can't find documentation and i don't know how to do it with pythonmagick. Anyone knows solution? In the worst case i use os/subprocess and convert ;-S Thanks. 回答1: You can use PIL and images2gif , a short PIL based module linked to on this blog page, and

Resize GIF animation, pil/imagemagick, python

不问归期 提交于 2019-12-02 18:37:03
I want to change size of GIF animation image using python and PIL or PythonMagick. I can't find solution. PIL and thumbnail method works for jpg and png but not for gif. ImageMagick has command mogrify/convert -resize '1280x1024>' but i can't find documentation and i don't know how to do it with pythonmagick. Anyone knows solution? In the worst case i use os/subprocess and convert ;-S Thanks. fraxel You can use PIL and images2gif , a short PIL based module linked to on this blog page , and available here . Code used to process this rose.gif is below. I set the images2gif.readGif 'read as numpy

PythonMagick can't find my pdf files

半城伤御伤魂 提交于 2019-11-27 19:11:17
I've downloaded and installed PythonMagick for python 2.7, 64 bit Windows 7, from the Unofficial Windows Binaries. I am trying to run this code (Processor.py) import PythonMagick pdf = 'test.pdf' p = PythonMagick.Image() p.density('600') p.read(pdf) p.write('doc.jpg') within this folder (D:\Python Projects\Sheet Music Reader) However, using that relative pdf path or pdf = "D:\\Python Projects\\Sheet Music Reader" results in this error; Traceback (most recent call last): File "D:/Python Projects/Sheet Music Reader/Processor.py", line 6, in <module> p.read(pdf) RuntimeError: Magick: