Created
May 22, 2022 15:25
-
-
Save djerfy/ce9b66ce935856800dce40d7a5f7ac9a to your computer and use it in GitHub Desktop.
Create a thumbnail image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PIL import Image | |
with Image.open(sys.argv[1]) as image: | |
image.thumbnail((128, 128)) | |
image.save(thumbnail_path, "JPEG") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment