BRRER-me! A tale of pixels and metadata.
60s Kodak Fotomat drive through.
When I print pictures online or in shops, I'd sometime rather prefer keeping the original files for myself than seeing them released into the third-parties jungle. This script is basically a combination of commands I use and it will help you (partially) anonymize your pictures and also reduce their carbon footprint.
- Resize JPEG files: Resizes all JPEG files in the current directory to 55% (by default) of their original size.
- Rename JPEG files: The script renames all JPEG files in the current directory to a sequential numbering (e.g., 1.jpg, 2.jpg, 3.jpg, etc.).
- Remove EXIF metadata: The script removes all EXIF metadata from the JPEG files in the current directory, overwriting the original files.
Note
The script is case insensitive towards file extensions and will consider .jpeg or .jpg files equivalently.
The following dependencies are required to be installed:
- ImageMagick (for image resizing), included in most distros.
- exiftool (for EXIF metadata removal)
To install the dependencies on Debian/Ubuntu, run the following commands:
sudo apt update && sudo apt install imagemagick libimage-exiftool-perl
- Save or download this script as a file.
- Navigate to the script folder and make it executable by running
chmod +x BRRER.sh
or runchmod +x /path/to/file/BRRER.sh
. - Navigate to the directory containing the JPEG files you want to process.
- Run the script by executing
./path/to/file/BRRER.sh
in the terminal. - Confirm that you are in the correct directory and want to proceed with the processing.
Warning
The script will overwrite the original files. Make sure to backup your all your files before running it!
- For security reasons, the script uses
find
with amaxdepth
value of 1 to search for JPEG files within the current directory, so it will only process files in the current directory and not the ones located in subdirectories.
The source code is provided under a Creative Commons CC0 license. See the LICENSE file for details.
By using this script, you acknowledge that the author shall not be held liable for any lost profits, lost revenues or opportunities, downtime, or any consequential damages or costs, resulting from the use of this script.