Created
November 17, 2016 09:54
-
-
Save wakwanza/e25057aa897effe1341047d907784e3b to your computer and use it in GitHub Desktop.
Optimize pngs and remove the EXIF data embedded in them
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/python | |
import os | |
import subprocess | |
for root, dirs, files in os.walk("."): | |
for file in files: | |
if file.endswith(".png"): | |
fpath = os.join.path(root,file) | |
subprocess.call(["exiv2","delete",fpath]); subprocess.call(["optipng","-o7",fpath]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment