
Learn how to use the Python Pillow module for image manipulation to open, display, and convert images, iterate through a folder, and save converted images in a new folder.
Explore practical image manipulation with the Pillow library, resizing and saving images, converting to grayscale, rotating, and applying blur effects using Python.
Compare and blend two images using Pillow's blend and composite functions, ensuring identical dimensions, then adjust with alpha and a mask to create a merged result.
open an image with Pillow, use getcolors and image size to count pixels, and use getpixel for coordinates; compare getcolors with getdata.
Learn to write text on an image with PIL by loading the image, creating an ImageDraw object, and configuring text with ImageFont (TrueType fonts) and coordinates for positioning.
The Python Imaging Library or PIL allowed you to do image processing in Python. However, PIL’s last release was way back in 2009 and the blog also stopped getting updated. Fortunately, there were some other Python folks that came along and forked PIL and called their project pillow. The pillow project is a drop-in replacement for PIL that also supports Python 3, something PIL never got around to doing.
Please note that you cannot have both PIL and pillow installed at the same time. There are some warnings in their documentation that list some differences between PIL and pillow that get updated from time to time, so I’m just going to direct you there instead of repeating them here since they will likely become out of date.