Advertisement
here2share

# Python_Strip_EXIF.py

Feb 8th, 2015
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. # Python_Strip_EXIF.py <<< Have not tried this out myself
  2.  
  3. import Image
  4. import os
  5. import sys
  6. cmdargs = str(sys.argv)
  7. Dir = str(sys.argv[1])
  8. filD = os.listdir(Dir)
  9. for fiD in filD:
  10.     if fiD.endswith((".jpg", ".jpeg")):
  11.         imG = ("%s/%s" % (Dir, fiD))
  12.         imF = open(imG)
  13.         image = Image.open(imF)
  14.         data = list(image.getdata())
  15.         iwE = Image.new(image.mode, image.size)
  16.         iwE.putdata(data)
  17.         iwE.save(imG)
  18.         print ("[OK] %s" % fiD)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement