Skip to content

Instantly share code, notes, and snippets.

@jterry
Created October 30, 2017 03:06
Show Gist options
  • Save jterry/3004d7a14bbca0195529715f233acbb9 to your computer and use it in GitHub Desktop.
Save jterry/3004d7a14bbca0195529715f233acbb9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import distutils.dir_util
import distutils.file_util
import os
from subprocess import call, check_output
for file in os.listdir("./screenshots/en-US/"):
if file.endswith(".png"):
if file.startswith('iPad Pro'):
height = check_output(["convert", "./screenshots/en-US/"+file, "-format", "%[fx:h]", "info:"])
if height != 2732:
call(["convert", "./screenshots/en-US/"+file, "-resize", "2048x2732!", "./screenshots/en-US/"+file])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment