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?
Asked
Active
Viewed 955 times
0
-
1Does this answer your question? [How do I resize an image using PIL and maintain its aspect ratio?](https://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio) – AMC Mar 03 '20 at 20:26
2 Answers
1
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