Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Python_Strip_EXIF.py <<< Have not tried this out myself
- import Image
- import os
- import sys
- cmdargs = str(sys.argv)
- Dir = str(sys.argv[1])
- filD = os.listdir(Dir)
- for fiD in filD:
- if fiD.endswith((".jpg", ".jpeg")):
- imG = ("%s/%s" % (Dir, 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