If the previous article talked about reducing image files size, then this article talks about rotating multiple image files. This article shows some command examples around 45, 90, and 150 degree rotation commands. This will be very useful for you working in e.g. graphic design field. It is done with the -rotate option.




degree=45


for i in *.png; do convert -verbose -rotate 120 "$i" "`echo $i | sed 's/.png/-converted.png/g'`"; done;



degree=90


for i in *.png; do convert -verbose -rotate 90 "$i" "`echo $i | sed 's/.png/-converted.png/g'`"; done;




degree=150


for i in *.png; do convert -verbose -rotate 150 "$i" "`echo $i | sed 's/.png/-converted.png/g'`"; done;




, , , , ,