Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Sunday, July 31, 2016 at 15:00

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.


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


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


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