Описание тега python-imaging-library
The Python Imaging Library (PIL) provides the Python language with a de-facto standard foundation for image work.
PIL’s API is lightweight but semantically consistent. It furnishes a range of comfortably Pythonic tools, whose top-level hierarchy covers a broad lexical range of the imaging fields’ usual suspects, including: pixel and channel processing; statistical analysis; affine, Gaussian, and kernel transforms, abstraction for compressors, binary formats, codecs, and the like; vector drawing and typesetting; pixel mathematics and color correction; matrices; programming and I/O paradigms. Each of these is notionally organized into a Python sub-package and implemented with an API in a mode whose form is germane to its concept – e.g. while the IO modules like PIL.Image
and PIL.ImageFile
generally follow along with the Python standard libraries — they employ OO-style conventions that very similar throughout – PIL
is not pedantic in this way, as other submodules are non-uniform when they need to be… PIL.ImageFilter
, for example, is written in a functional style (obfuscated slightly, due to having been CamelCased). And PIL.ImageMath
exposes its interface as a little subset of Python language itself, with which the programmer can tersely and legibly describe an algorithm – which PIL can then take and deterministically pipeline and vectorize into something much faster than naïve Python.However, it only supports Python 1.5.2 and newer, including 2.5 and 2.6.
More information can be found at PIL ( PythonWare.com); founded and first developed by Fredrik Lundh, the original PIL codebase is open source, but unmaintained since 2011.
There is also an active, maintained and popular fork of PIL called Pillow which releases quarterly with security updates, new features and bug fixes, it supports python 3.x.