Pillow

Pillow

Language
Python
Category
2
Version
9.2.0
Authors
Tidelift
Description
Pillow is a free and open-source library for the Python programming language that allows us to manipulate digital images.
Install Instructions
  • Install with pip
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
Usage
  • This quick example demonstrates rotating an image 45 degress with Pillow
from PIL import Image
#Open image using Image module
im = Image.open("images/cuba.jpg")
#Show actual Image
im.show()
#Show rotated Image
im = im.rotate(45)
im.show()
  • Pillow also allows for data generation from the image such as the file name, size, format and more!
image = Image.open('beach1.jpg')
image.filename # beach1.jpg
image.format # 'JPEG'
image.size # (1280, 721)
Links