Python Image Library(PIL) を CentOS 6の64bit環境で使えるようにする

参考にしたページは以下。

http://itekblog.com/centos-6-x-install-pil-python-imaging-library-tutorial/

EPEL リポジトリの登録が必要のようです

cd /opt/
wget http://mirrors.nl.eu.kernel.org/fedora-epel/6/i386/epel-release-6-7.noarch.rpm
rpm -Uvh epel-release-6-7.noarch.rpm
rm epel-release-6-7.noarch.rpm -f

インストール

yum install python-imaging

テスト
img.pyを作成

from PIL import Image
img = Image.new('RGB', (100, 100), 'white')
img.save('white.png') 

実行,確認

 $ python img.py

white.pngが作成されていればOKです。

Python Image Library(PIL) ドキュメント
http://effbot.org/imagingbook/pil-index.htm