The Python Imaging Library |
![]() |
|
Copyright © 1997 by Fredrik Lundh <fredrik@pythonware.com> | ||
Updated 17 Aug 1997 |
< The Python Imaging Library | Overview | Tutorial >
The Python Imaging Library adds image processing capabilities to your Python interpreter.
This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.
The core image library is designed for fast access to data stored in a few, basic pixel formats. It should be well suited as a base for a general image processing tool.
Let's look at a few possible uses for this library:
The Python Imaging Library is well suited for image archival and batch processing applications. You can use the library to create thumbnails, convert between file formats, print images, etc.
The current version identifies and reads a large number of formats. Write support is intentionally restricted to the most commonly used interchange and presentation formats.
The current release includes Tk PhotoImage and BitmapImage interfaces, as well as a Windows DIB interface that can be used with PythonWin. For X and Mac displays, you can use Jack Jansen's img library.
For debugging, there's also a show method in the Unix version which calls xv to display the image.
The library contains some basic image processing functionality, including point operations, filtering with a set of built-in convolution kernels, and colour space conversions.
The library also supports image resizing, rotation and arbitrary affine transforms. However, only nearest neighbour interpolation is available.
There's a histogram method allowing you to pull some statistics out of an image. This can be used for automatic contrast enhancement, and for global statistical analysis.
< The Python Imaging Library | Overview | Tutorial >