Created
March 29, 2012 01:14
-
-
Save hysysk/2232105 to your computer and use it in GitHub Desktop.
Make a jpeg file dartier
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
import Image | |
import glob, os, sys | |
counter = int(sys.argv[2]) | |
def aging(filename, counter): | |
image = Image.open(filename) | |
image.save(filename, "JPEG", quality=10) | |
counter = counter - 1 | |
if counter>0: | |
aging(filename, counter) | |
aging(sys.argv[1], counter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment