Skip to content

Instantly share code, notes, and snippets.

@djerfy
Created May 22, 2022 15:25
Show Gist options
  • Save djerfy/ce9b66ce935856800dce40d7a5f7ac9a to your computer and use it in GitHub Desktop.
Save djerfy/ce9b66ce935856800dce40d7a5f7ac9a to your computer and use it in GitHub Desktop.
Create a thumbnail image
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