# coding=UTF-8
import PythonMagick
# リサイズ
img = PythonMagick.Image("SF.JPG")
img.sample(PythonMagick._PythonMagick.Geometry(100,100))
img.write("img3.jpg")
元画像
出力画像

※ubuntuでPythonMagickをインストールするには、以下のコマンドを実行します。
sudo apt-get install python-pythonmagick
動作環境
python 2.6.6, python-pythonmagick 0.9.1
No comments:
Post a Comment