Installing PIL on Python 3.7 to make thumbnails

In this video: PIL or Pillow or how to … image

When you want to work with images in Python, there is nothing better than a pillow… module. To install it, go into the cmd and type pip install Pillow, like you can see in the video below. In the same video we will show how to…

Create a thumbnail with Python and PIL

# Pythonprogramming.altervista.org

# code to make a thumbnail

from PIL import Image

im = Image.open("getit.png")
im.thumbnail((128, 128), Image.ANTIALIAS)
im.save("thumbnail.png", "PNG")

 

It’s very easy to use the PIL / Pillow module in Python. Let’s see a fresh install in Python 3.7, the ultimate Python version (july 2018, now).

The video with only code to thumbnail an image (no installation of PIL)

Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.