IM Scripts
From Mmassico
for
IM Scripts
Jump to:
navigation
,
search
<pre> #!/bin/bash rm -R ./album mkdir ./album filecount=$(ls -1 *.JPG | wc -l) echo "$filecount file(s) to process..." fileindex=0; for i in *.JPG do fileindex=$(($fileindex+1)) percent=$((100*$fileindex/$filecount)) orientation=$(identify -format %[EXIF:Orientation] $i) resize_cmd="" if [ "$orientation" = "8" ] then resize_cmd="-resize 170" rotate="clockwise" fi if [ "$orientation" = "1" ] then resize_cmd="-resize x170" rotate="normal" fi if [ "$orientation" = "6" ] then resize_cmd="-resize 170" rotate="counterclockwise" fi echo -n "$fileindex/$filecount (${percent}%) : $i - $rotate ." convert -auto-orient ${resize_cmd} "$i" "./album/_thb_$i" echo -n "." convert -auto-orient -resize 40% "$i" "./album/$i" echo "." done </pre>
Return to
IM Scripts
.
Views
Page
Discussion
View source
History
Personal tools
13.59.230.20
Talk for this IP address
Log in
MediaWiki
Main Page
Recent changes
Notes
Help
Navigation
Home Page
Linux How To
Search
Toolbox
What links here
Related changes
Special pages