EXIF (Exchangeable Image File Format) data often contains metadata such as camera settings, date, and location, which can be sensitive or unnecessary for certain use cases.
This Python script removes EXIF data from images in a specified directory, using the Python Imaging Library (PIL) to manipulate image files.
- Recursively scans a specified directory and its subdirectories for image files (BMP, PNG, JPG, JPEG, GIF).
- Lists the found image files and their count.
- Prompts the user for confirmation before proceeding with EXIF data removal.
- Saves modified images with their original file path, overwriting original images.
-
Clone the repository.
-
Navigate to the script directory.
-
Run the script:
python exif_cleaner.py
-
Enter the folder path containing the images when prompted.
-
Review the list of found images and confirm to proceed with EXIF data removal.
- Python 3.x
- Pillow library (PIL fork)
Install Pillow using:
pip install pillow