The problems everyone hits
Each one reproduced on a real Pillow install, explained, and fixed with code the build runs.
ModuleNotFoundError: No module named 'PIL'Pillow installed but Python cannot find it: it went into a different interpreter. Check and fix for every setup.
Read the fix →Errormodule 'PIL.Image' has no attribute 'ANTIALIAS'Removed in Pillow 10. Image.LANCZOS is the same filter and works on every version.
PIL.UnidentifiedImageError: cannot identify image fileUsually not an image at all: an HTML error page, an empty download or a HEIC photo. How to tell which.
Read the fix →GuideResize and keep the aspect ratiothumbnail, contain, cover, fit and pad compared side by side.
Quality, optimize, WebP and AVIF on the same photo, with the sizes charted.
Read the fix →GuideAdd text to an imageFonts, centring with anchors, outlines, wrapping, emoji and non-Latin scripts.
Read the fix →Measured, not guessed
Every number and chart on the site is printed by real Pillow when the site is built.
The same photo, four ways
JPEG q85 optimize 184 KB ยท WebP q80 78 KB ยท WebP q80 method=6 75 KB ยท AVIF q60 62 KB. Sizes measured on Pillow 13.0.0; the guide charts every setting.
Run real Pillow, here
Examples with a ▶ Run button execute Pillow in your browser through WebAssembly. Edit the code, see the output. Nothing to install, nothing uploaded.
Visual reference
Every filter, enhancer and draw call shown on the same photo, with its speed measured.
Tools on your image
Black and white, watermarks, transparent PNG to JPEG: preview live, then run the exact script.
Which filter? Measured.
LANCZOS vs BICUBIC vs NEAREST on a test pattern built to expose aliasing, with the artefacts scored.
Build a Pillow script, run it here
Tick the steps you need; the script updates as you go. All 1,042 combinations of these options are run against Pillow 13.0.0 when the site is built.
from PIL import Image, ImageDraw, ImageEnhance, ImageOps
img = Image.open("phone.jpg")
# Fix phone-photo rotation (EXIF)
img = ImageOps.exif_transpose(img)
# Shrink to fit 800ร800
img.thumbnail((800, 800), Image.LANCZOS)
# More contrast
img = ImageEnhance.Contrast(img).enhance(1.4)
# Add a caption
draw = ImageDraw.Draw(img)
draw.text((img.width // 2, img.height - 20), "Launch Pad 39B", fill="white", anchor="ms",
font_size=max(16, img.width // 18), stroke_width=2, stroke_fill="black")
img.save("result.jpg", quality=85, optimize=True)
print("saved result.jpg:", img.size, img.mode)
Real Pillow, on your own image
Preview instantly, then run the generated script with real Pillow in your browser and download the result.
Transparent PNG to JPEG
Flatten a transparent PNG onto white or any colour and save it as JPEG.
Black and white (1-bit)
Turn any image into pure black and white with a fixed threshold, automatic Otsu or Floyd-Steinberg dithering.
Watermark studio
Design a text or logo watermark on your own image.
Pillow, NumPy, OpenCV converter
Pick what you have and what you need (Pillow, NumPy, OpenCV, base64, PyTorch, BytesIO) and get a tested script that handles channel order, dtype and axes..
Every guide, fix and reference page
Grouped by what you are trying to do. ■ guide ■ error fix ■ reference
If it is on the page, it ran.
- Reproduce the real problemError pages show tracebacks captured from failing code, not retyped from memory.
- Run every exampleEach example runs on Pillow 13.0.0 and Python 3.13 in a clean folder; output and images are written into the page.
- Re-run everywhereCI repeats every example on Linux, Windows and macOS and against new Pillow releases; differences are shown under each example.
- Chart only what was measuredEvery chart is drawn from the output printed beside it.
Read the full process · corrections to hello@pillowpython.com
*Expected differences, explained on the page, such as font lookup on Windows. Updated by CI on every run.
Questions people ask
Is this the official Pillow website?
No. Pillow Python is an independent site. The official documentation is at pillow.readthedocs.io, and the project lives on GitHub. We are not affiliated with it.
What is the difference between PIL and Pillow?
PIL, the Python Imaging Library, stopped at version 1.1.7 in 2009 and never supported Python 3. Pillow is its maintained fork. You install pillow and import PIL: from PIL import Image.
How are the examples tested?
Every example is run by a script against a real Pillow installation before the page is published, and the output you see is what it printed. A scheduled job re-runs them on Linux, Windows and macOS and against each new Pillow release. More on how we test.
Which Pillow version do I have?
Run python -c "import PIL; print(PIL.__version__)" with the Python that runs your code. The install guide shows how to upgrade, and which Pillow supports which Python.
Do the Run buttons upload my code or images?
No. They run Pillow inside your browser with Pyodide (Python compiled to WebAssembly). Nothing is sent to a server; the first run downloads about 12 MB of Python and Pillow from a public CDN.
Stuck on an error?
Paste the last line of the traceback. If we have not covered it yet, email it to hello@pillowpython.com and we will reproduce it.