Skip to content

Instantly share code, notes, and snippets.

Created October 3, 2020 14:33
What would you like to do?
# Pete Prodoehl <>
# Resizes Game Boy Camera photos to 1280x1152
from PIL import Image
import glob
import getopt
import sys
import os
# read command line arguments first
fullCmdArguments = sys.argv
# then read further arguments
argumentList = fullCmdArguments[1:]
# loop through files, resizing each one
for infile in argumentList:
file, ext = os.path.splitext(infile)
img =
newimg = img.resize((1280, 1152))
newimg.convert('RGB').save(file + "-1280.png","PNG",Optimize=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment