Python imaging notes

This was the home of PythonWare and the Python Imaging Library. PIL itself stopped in 2011 and lives on as Pillow. What sits here now is written for the code people are running today, with a set of small tools that work in the browser.

Tools

PIL to Pillow converter

Paste code written against old PIL and see what has to change for Pillow 10 and later. Covers the constants that moved into enums, the renamed methods and the imports.

Open the converter

Pillow playground

Resize, rotate, blur and adjust an image with sliders, watch the result, and copy the Pillow code that produces it.

Open the playground

Resampling filters compared

Nearest, bilinear, bicubic and Lanczos on your own image, side by side, with timings. The filters are implemented properly, not faked with browser smoothing.

Compare the filters

Image modes explained

See what RGB, L, 1 and P actually do to a picture, including Floyd and Steinberg dithering, with the memory cost of each.

Open the mode viewer

Image converter and compressor

Convert between PNG, JPEG and WEBP, resize, and see how many bytes you saved. Several files at once.

Open the converter

Exif viewer and remover

See the camera, date and GPS data hidden inside a photo, then save a copy with all of it stripped out.

Open the viewer

Colour palette from an image

Pull the main colours out of a picture by median cut, the same algorithm Pillow quantises with, and copy them as hex.

Extract a palette

Image to ASCII art

Turn a picture into text art, adjust the width and characters, and take the Python that does the same.

Make some art

Reference