Skip to content

Instantly share code, notes, and snippets.

@nicolaskenner
Created May 26, 2020 19:40
Show Gist options
  • Save nicolaskenner/6aa96fb40b8bf604885e713a0bdc19a1 to your computer and use it in GitHub Desktop.
Save nicolaskenner/6aa96fb40b8bf604885e713a0bdc19a1 to your computer and use it in GitHub Desktop.
Python Remove Exif
from PIL import Image
from secrets import token_urlsafe
if __name__ == '__main__':
filepath = input('File Path: ')
image = Image.open(filepath)
image_data = list(image.getdata())
image_without_exif = Image.new(image.mode, image.size)
image_without_exif.putdata(image_data)
image_without_exif.save('{}.jpeg'.format(token_urlsafe()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment