Skip to content

Instantly share code, notes, and snippets.

@hysysk
Created March 29, 2012 01:14
Show Gist options
  • Save hysysk/2232105 to your computer and use it in GitHub Desktop.
Save hysysk/2232105 to your computer and use it in GitHub Desktop.
Make a jpeg file dartier
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