Wand

Wand is a ctypes-based simple ImageMagick binding for Python.

from wand.image import Image
from wand.display import display

with Image(filename='mona-lisa.png') as img:
    print(img.size)
    for r in 1, 2, 3:
        with img.clone() as i:
            i.resize(int(i.width * r * 0.25), int(i.height * r * 0.25))
            i.rotate(90 * r)
            i.save(filename='mona-lisa-{0}.png'.format(r))
            display(i)

You can install it from PyPI (and it requires MagickWand library):

$ apt-get install libmagickwand-dev
$ pip install Wand

Why just another binding?

There are already many MagickWand API bindings for Python, however they are lacking something we need:

  • Pythonic and modern interfaces
  • Good documentation
  • Binding through ctypes (not C API) — we are ready to go PyPy!
  • Installation using pip or easy_install

Requirements

  • Python 2.6 or higher
    • CPython 2.6 or higher
    • CPython 3.2 or higher
    • PyPy 1.5 or higher
  • MagickWand library
    • libmagickwand-dev for APT on Debian/Ubuntu
    • imagemagick for MacPorts/Homebrew on Mac
    • ImageMagick-devel for Yum on CentOS

Troubleshooting

Mailing list

Wand has the list for users. If you want to subscribe the list, just send a mail to:

The list archive provided by Librelist is synchronized every hour.

Stack Overflow

There’s a Stack Overflow tag for Wand:

http://stackoverflow.com/questions/tagged/wand

Freely ask questions about Wand including troubleshooting. Thanks for sindikat‘s contribution.

Quora

There’s a Quora topic for Wand: Wand (ImageMagick binding). Be free to add questions to the topic, though it’s suitable for higher-level questions rather than troubleshooting.

Open source

Wand is an open source software written by Hong Minhee (initially written for StyleShare). See also the complete list of contributors as well. The source code is distributed under MIT license and you can find it at GitHub repository. Check out now:

$ git clone git://github.com/dahlia/wand.git

If you find a bug, please notify to our issue tracker. Pull requests are always welcome!

We discuss about Wand’s development on IRC. Come #wand channel on freenode network.

Check out Wand Changelog also.

Build Status Coverage Status

Indices and tables