Can I access ImageMagick API with Python?

I would recommend using Wand (explanations follows).

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

  • work error/problem free
  • be regularly maintained and up to date
  • allow nice objective Python

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:

  • GraphicsMagick
  • PythonMagick – first implementation
  • PythonMagickWand/Achim Domma – first Wand – a CDLL implementation
  • PythonMagickWand/Ian Stevens
  • MagickFoo – included in python-magickwand
  • Wand/Hong Minhee – not the latest project
  • [UPD 2023] Eric McConville https://github.com/emcconville/wand

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.

[UPD 2023] PS as any API software py-wand inherits any transient errors from the parent

Leave a Comment