Created
May 26, 2020 19:40
-
-
Save nicolaskenner/6aa96fb40b8bf604885e713a0bdc19a1 to your computer and use it in GitHub Desktop.
Python Remove Exif
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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