Pillow is a powerful Python library for image manipulation. Here's a quick guide to get started:
Installation 📦
Install Pillow via pip:
pip install pillow
Basic Usage 📌
- Open an image:
from PIL import Image img = Image.open("/path/to/image.jpg")
- Resize image:
img.resize((width, height))
- Save modified image:
img.save("/path/to/new_image.jpg")
Advanced Features 🌟
- Image filters:
img.filter(ImageFilter.BLUR)
- Color conversion:
img.convert("L") # Grayscale
- Cropping:
img.crop((left, upper, right, lower))
For more details, check our Pillow Documentation 📘
Pillow_Logo
Need help with image operations? Explore our Image Processing Tutorials 📖
Image_Processing_Example