PIL has very long history and the most of Python projects still depend on it. We will work on PIL compatibility layer using Wand. It will provide two ways to emulate PIL:
Module-level compatibility which can be used by changing import:
try: from wand.pilcompat import Image except ImportError: from PIL import Image
Global monkeypatcher which changes sys.modules:
from wand.pilcompat.monkey import patch; patch() import PIL.Image # it imports wand.pilcompat.Image module
Primary interface of ImageMagick is convert command. It provides a small parameter language, and many answers on the Web contain code using this. The problem is that you can’t simply copy-and-paste these code to utilize Wand.
This feature is to make these CLI codes possible to be used with Wand.
It makes numpy.asarray() able to take Image object to deal with its pixels as matrix.
Its branch name will be numpy.