gitmyhub

Pillow

Python ★ 14k updated 5h ago

Python Imaging Library (fork)

Pillow is the most-used Python image library, letting you open, resize, crop, convert, filter, and composite images in dozens of formats, JPEG, PNG, GIF, TIFF, WebP, and more, with a simple API.

Pythonsetup: easycomplexity 2/5

Pillow is a Python library for working with images. It is the actively maintained successor to the original Python Imaging Library (PIL), which stopped receiving updates years ago. Pillow adds image processing capabilities to Python programs and is one of the most widely used image libraries in the Python ecosystem, relied on by web frameworks, data science tools, and content management systems.

The library can open, manipulate, and save images in a wide range of file formats, including JPEG, PNG, GIF, TIFF, BMP, WebP, and many others. Common operations include resizing, cropping, rotating, flipping, converting between color modes such as RGB to grayscale, drawing shapes and text onto images, applying filters and color adjustments, and compositing multiple images together. These capabilities suit tasks like generating thumbnails automatically, processing user-uploaded photos on a website, creating visual reports, or running batch conversions across large folders of files.

Installation is done through pip, Python's standard package manager. Detailed documentation, a handbook with code examples for common tasks, and a guide to supported file formats are hosted on ReadTheDocs. The library is tested across Linux, macOS, and Windows using automated build pipelines, and it participates in a continuous fuzzing program that tests it for crashes and unexpected behavior under unusual inputs.

The repository's README is brief and primarily links to the documentation, contribution guide, release notes, and changelog rather than including inline examples. Development is financially supported by Tidelift, Thanks.dev, and GitHub Sponsors. Security vulnerabilities should be reported privately through GitHub's security advisory system rather than in the public issue tracker, to allow time for a fix before disclosure.

Where it fits