I uploaded 23 some image files to the computer like above drawing.
The Bash script crop each image to 2967×2036 out of 3888×2592 resolution, reduce to 880×660, save it to IMG_*.jpg file.
convert $file -crop 2967×2036+605+551 -resize $resolution “${file/.JPG}”.jpg
I picked up common canvas size for all the images by physically examine few images using GIMP. 2967 is width, 2036 is height of the new image, and (605, 551) is starting position of the cropped image.
“${file/.JPG}”.jpg replace JPG extension to jpg because most websites I upload prefer lowercase letter.
After that I increased the contrast of all image files before uploading to the site.
convert IMG_*.jpg -level 20%,100% d*.jpg
All the images were reduced to 880×660 resolution, file size is about 200KB which is ten to twelve times smaller than original image. Here is one of final image file.
$ more resizejpg
#!/bin/bash
resolution=$1
if [ $# -ne 1 ]
then
echo "Usage: `basename $0` resolution"
exit 1
fi
for file in *.JPG;
do
echo reduce $file to "$resolution"
convert $file -crop 2967x2036+605+551 -resize $resolution "${file/.JPG}".jpg
done