Documentation Menu

Pillow reference notes

Short, practical notes on the parts of Pillow people use most: the handbook workflow, core concepts, the main modules and how Pillow fits with NumPy, OpenCV and web frameworks. These notes are independent and selective. For the complete, authoritative API, use the official Pillow documentation.

Looking for step-by-step help? Start with the tested guides, the error fixes or the browser tools.
📖

Handbook & Tutorial

Start here. Covers opening images, saving, reading metadata, batch processing, and the most common operations.

🧠

Concepts

Understand Modes (RGB, RGBA, L, CMYK, HSV), Bands, Coordinate Systems, Filters, and how Pillow treats pixel data.

🗂️

Image File Formats

JPEG, PNG, GIF, WEBP, BMP, TIFF, ICO, PDF and 30+ more. Read/write support matrix, parameters, and quirks.

🔬

Appendices

Filter reference, resampling algorithms (LANCZOS, BICUBIC, NEAREST), transpose operations, and color modes.

⚙️

Image Module Reference

Complete API for Image.open(), Image.new(), save(), convert(), paste(), and all methods.

🔗

Integration Guide

Using Pillow with Django, FastAPI, Flask, NumPy, PyTorch, Tkinter, and Qt.

Quick Reference: All Modules

ModulePurposeKey Functions
ImageCore image class — open, create, save, transformopen(), new(), save(), convert(), resize(), crop()
ImageChopsChannel arithmetic operations (add, subtract, multiply)add(), subtract(), multiply(), difference()
ImageCmsICC colour profile managementprofileToProfile(), buildTransform()
ImageColorParse CSS3 colour strings to tuplesgetrgb(), getcolor()
ImageDraw2D graphics drawing onto Image objectsline(), rectangle(), ellipse(), polygon(), text()
ImageEnhanceAdjust sharpness, contrast, brightness, colorContrast, Brightness, Sharpness, Color
ImageFileFile loading helpers and parser base classParser, LOAD_TRUNCATED_IMAGES
ImageFilterPredefined and custom convolution filtersGaussianBlur, SHARPEN, UnsharpMask, Kernel
ImageFontTrueType/OpenType font loading for text drawingtruetype(), load(), load_default()
ImageGrabScreen capture and clipboard accessgrab(), grabclipboard()
ImageMathEvaluate pixel-level math expressionslambda_eval(), unsafe_eval()
ImageMorphMorphological operations on binary imagesLutBuilder, MorphOp
ImageOpsReady-made image processing operationsautocontrast(), invert(), fit(), pad(), grayscale()
ImagePaletteColour palette management for 'P' mode imagesImagePalette()
ImagePathGeometric path storage and manipulationPath(), getbbox(), transform()
ImageSequenceIterate over animation frames (GIF, WebP, TIFF)Iterator()
ImageStatPer-band pixel statistics (mean, stddev, rms)Stat(), .mean, .stddev, .rms
ImageTransformAffine, perspective, and mesh transformsAffineTransform, PerspectiveTransform, MeshTransform
ExifTagsDictionary mapping EXIF tag IDs to human namesTAGS, GPSTAGS
PixelAccessFast direct pixel read/write via img.load()load(), [x, y] indexing