PILKit is a collection of utilities for working with PIL (the Python Imaging Library).
One of its main features is a set of processors which expose a simple interface for performing manipulations on PIL images.
For the complete documentation on the latest stable version of PILKit, see PILKit on RTD.
If you’ve never seen Pillow before, it considers itself a more-frequently updated “friendly” fork of PIL that’s compatible with setuptools. As such, it shares the same namespace as PIL does and is a drop-in replacement.
The “pilkit.processors” module contains several classes for processing PIL images, which provide an easy to understand API:
from pilkit.processors import ResizeToFit img = Image.open('/path/to/my/image.png') processor = ResizeToFit(100, 100) new_img = processor.process(img)
A few of the included processors are:
There’s also a ProcessorPipeline class for executing processors sequentially:
from pilkit.processors import ProcessorPipeline, ResizeToFit, Adjust img = Image.open('/path/to/my/image.png') processor = ProcessorPipeline([Adjust(color=0), ResizeToFit(100, 100)]) new_image = processor.process(img)
In addition to the processors, PILKit contains a few utilities to ease the pain of working with PIL. Some examples:
Utilities are also included for converting between formats, extensions, and mimetypes.
Please use the GitHub issue tracker to report bugs. A mailing list also exists to discuss the project and ask questions, as well as the official #imagekit channel on Freenode. (Both of these are shared with the django-imagekit project—from which PILKit spun off.)