Files
image_processing/images_resize.sh
T
2025-11-27 02:33:17 +00:00

15 lines
530 B
Bash
Executable File

#!/bin/bash
#
# images_resize Resizing large JPGs in current directory
# Based on: https://shkspr.mobi/blog/2016/12/converting-rar-to-zip-in-linux/
#
# Usage: xxx.sh
echo "Resizing large JPGs in $(pwd)"
find . -regextype posix-egrep -regex ".*\.(jpg|JPG|JPEG|jpeg)$" -print0 | while IFS= read -r -d '' f
#echo "Resizing $(f)"
#do mogrify -resize 2800000@@\> -sampling-factor 4:2:0 -strip -quality 85% -colorspace RGB $f
do ~/Applications/magick "$f" -resize 8000000@@\> -sampling-factor 4:2:0 -strip -quality 85% "$f"
done