且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以使用Python访问ImageMagick API吗?

更新时间:2021-11-10 23:31:29

我建议使用魔杖(解释如下) 。

I would recommend using Wand (explanations follows).

我正在寻找与ImageMagick库的正确绑定,这将:

I was looking for proper binding to ImageMagick library, that would:


  • 工作错误/无问题

  • 定期维护和更新

  • 允许好的目标Python

但实际上python API(绑定)有太多不同的(大多数已停产)版本。在阅读了Benjamin Schweizer的精彩历史概述后,它已经变得清晰(另见他的 github wiki

But indeed python API (binding) has too many different (mostly discontinued) versions. After reading a nice historical overview by Benjamin Schweizer it has all become clear (also see his github wiki):


  • GraphicsMagick

  • PythonMagick - 首次实施

  • PythonMagickWand / Achim Domma - 第一个魔杖 - 一个CDLL实现

  • PythonMagickWand / Ian Stevens

  • MagickFoo - 包含在python-magickwand

  • Wand / Hong Minhee - 最新项目

  • GraphicsMagick
  • PythonMagick - first implementation
  • PythonMagickWand/Achim Domma - first Wand - a CDLL implementation
  • PythonMagickWand/Ian Stevens
  • MagickFoo - included in python-magickwand
  • Wand/Hong Minhee - the latest project

现在Wand只是一个(简化)ImageMagick的C API.. API是C编程语言和ImageMagick图像处理库之间的推荐接口。与MagickCore C API不同,MagickWand仅使用一些不透明类型。访问器可用于设置或变得重要魔杖属性。 (查看项目主页

Now Wand is just a (reduced) C API to the ImageMagick ".. API is the recommended interface between the C programming language and the ImageMagick image processing libraries. Unlike the MagickCore C API, MagickWand uses only a few opaque types. Accessors are available to set or get important wand properties." (See project homepage)

因此,它已经是一个易于维护的简化界面。

So it is already a simplified interface that is easer to maintain.