Simple Python scripts to resize, blur, and compress images in batch.
You can run one step at a time, or use the main runner to do multiple steps in one flow.
- Resize images
- Blur images
- Compress images
- Convert image format
- Process a single image or a whole folder
Supported formats:
jpgjpegpngwebpbmptiff
runme.py- main interactive toolresize.py- resize onlyblur.py- blur onlycompress.py- compress only
pip install Pillow python-dotenvpython runme.pyThe tool will ask you:
- which workflow you want
- which image or folder to use
- where to save the output
- what resize, blur, or compression settings you want
If you just want the easiest way:
- Put your images in the
inputfolder, or choose any image/folder when asked. - Run:
python runme.py- Pick a workflow:
ResizeBlurCompress- or a combined workflow like
Resize -> Blur -> Compress
- Answer the prompts.
- Check your output folder for the processed images.
If you want just one operation:
python resize.py
python blur.py
python compress.pyEach script opens its own simple interactive menu.
You do not need to edit .env to use the project.
If you want default values, you can add settings like:
TARGET_RESOLUTIONS=1080x1920,720x1280
OUTPUT_FOLDER_LABELS=1920x1080,1280x720
OUTPUT_FOLDER_PREFIX=drawable-xxhdpi-These values are used as defaults in the interactive prompts.
- Folder input is processed recursively.
- Transparent images are handled correctly when possible.
- JPEG does not support transparency, so transparent areas are flattened when saving as JPEG.