To make sure that this script works correctly, check that ImageMagic pack is installed on your Linux machine. #! /bin/bash dir=$1 target_dir=$2 mkdir -p $target_dir list=`ls -1 $1` for i in $list do echo $i convert $dir/$i -resize 50% $target_dir/$i done Usage: ./convert_50.sh Pictures/temp/ Pictures/temp_new This will resize all images in location Pictures/temp/ for 50%… Continue reading Bash script to resize images
It took me long time to create an universal function which would create thumbnails from pictures and suit all my needs. The base for this function, I took from here. But I modified it slightly.
I consider two basic logics on the idea how to rotate images on the site.