Reputation: 25
I'm using PIL with Python 3.8 to make screenshots of my screeen but the size of them is too large. How can I reduce it?
Upvotes: 0
Views: 1411
Reputation:
from PIL import Image
im = Image.open("hopper.jpg")
# Provide the target width and height of the image
(width, height) = (im.width // 2, im.height // 2)
im_resized = im.resize((width, height))
source PIL Docs
Upvotes: 1