Skip to content

Instantly share code, notes, and snippets.

@raster

raster/GBC1280.py

Created Oct 3, 2020
Embed
What would you like to do?
#!/usr/local/bin/python3
#
# Pete Prodoehl <pete@2xlnetworks.com>
#
# 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 = Image.open(infile)
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
You can’t perform that action at this time.