This Python script processes images by proportionally scaling them down to fit within a specified maximum dimension (default 2 inches) and adding a black border around them. It uses the Pillow library to handle image manipulation and preserves the aspect ratio of each image while converting dimensions from inches to pixels based on a configurable DPI setting (default 300).
To use the script, run it from the command line with two arguments: python image_outline_scaler.py <input_directory> <output_directory>. The script scans the input directory for supported image formats (JPG, PNG, BMP, GIF, TIFF, WebP), processes each image by scaling and adding borders, and saves the results to the output directory with the same filenames. It provides feedback on successful and failed conversions.
This tool is ideal for preparing images for inclusion in multi-image documents where file size optimization is critical, such as creating reports, presentations, or documentation compilations. The uniform scaling and border styl