Introduction to Python Image Library

Nayana Mahajan
3 min readApr 12, 2022

What is Python Image Library?

  1. Python Image Library is used for manipulating images and working with different formats of images.
  2. In the new version, it is known as PILLOW
  3. These are two methods to display images in python i.e. one in the photo viewer and the other in the Tkinter window.
  4. PIL displays images in photo viewer (by default viewer software) but we will mostly use the matplotlib library of python to display the image within the console in this tutorial

What you will learn??

In this tutorial, we are going to perform the following transformations with Image objects in PIL

  1. Reading and displaying Image

2. Copying Image

3. Resizing images in Python

4. Changing image mode

5. Affine transform with PIL

6. Cropping images

7. Creating image thumbnails

8. Image rotations, and a lot more . . .

Code Snippets

Install the required libraries

References

https://python-pillow.org/

https://pillow.readthedocs.io/en/stable/

https://pillow.readthedocs.io/en/stable/handbook/index.html

https://en.wikipedia.org/wiki/Python_Imaging_Library

Hope you enjoyed the tutorial.

Happy Learning!!

--

--