Created
October 30, 2017 03:06
-
-
Save jterry/3004d7a14bbca0195529715f233acbb9 to your computer and use it in GitHub Desktop.
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
#!/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