Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1738974
  • 博文数量: 410
  • 博客积分: 9563
  • 博客等级: 中将
  • 技术积分: 4517
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-03 19:59
个人简介

文章分类

全部博文(410)

文章存档

2017年(6)

2016年(1)

2015年(3)

2014年(4)

2013年(32)

2012年(45)

2011年(179)

2010年(140)

分类: LINUX

2013-06-02 21:22:16

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

      正在不断测试中...

ImageMagick的python接口

  • PythonMagick (BROKEN)       the official bindings, and somewhat up-to-date (last update 2012-09-19), I could get it to compile, but it threw TypeErrors when trying to run. You can compile it like so:

./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

  • (BROKEN)

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

  • (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.

  • (WORKS!)

      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.

  • (WORKS!)

      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
阅读(4049) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~