pgmagick安装指南

4000阅读 0评论2013-06-02 bailiangcn
分类:LINUX

      最近在选择python的imagemagick的接口,但是选择不太多,默认的PIL功能不是太强大,另外的都不是太活跃。

      正在不断测试中...

ImageMagick的python接口

./configure --prefix=/opt/local CPPFLAGS="-I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7" LDFLAGS=-L/opt/local/lib

      this shows up in searches, but it hasn’t been updated in 5 years. It’s as you can imagine, broken.

      last updated 2012-01-22, it includes a nice README (w/ the aforementioned history) and examples and I wanted it to work, alas, I couldn’t get it to.

      Wand is under active development (last commit 2013-01-31), is Pythonic, has community contributions, and works! Sounds perfect, right? Alas, it doesn’t support many features currently (layers, effects, animation etc) although it’s on the roadmap.

      This lib was the closest to doing what I needed. It’s very active (last commit 2013-02-10) and is much more comprehensive than Wand.. however, while supposedly working for ImageMagick, I could only get it working w/ GraphicsMagick, which in my case, was missing features that I needed. There are decent docs but very little real code out there. Here btw, is how I got it running (it has some boost issues; also, pip doesn’t work):

     $ workon ELC # 在 virtualenv 环境

     $ sudo apt-get install libmagick++-dev
     $ sudo apt-get install libboost-python-dev
     $ sudo apt-get install libgraphicsmagick++1-dev 
     $ pip install pgmagick
上一篇:实现markdown的页内跳转
下一篇:django 学习总结(1.5版)