Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Strip_EXIF.py
- import Image
- import os
- import sys
- Dir = '/'.join(sys.argv[-1].split('\\')[:-1])
- print Dir
- filD = os.listdir(Dir)
- for fiD in filD:
- print fiD
- if fiD.endswith((".jpg", ".jpeg")):
- imG = ("%s/%s" % (Dir, fiD))
- print "Accessing... %s" % fiD
- imF = open(imG)
- image = Image.open(imF)
- data = list(image.getdata())
- iwE = Image.new(image.mode, image.size)
- iwE.putdata(data)
- iwE.save(imG)
- print "[OK] %s" % fiD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement