0

I have one round image. I need to rotate this image in 1 degree steps. i.e. 60 rotated images of single image. How may I do this with imagemagick ?

3

Yes it is possible.

This one will create a right rotating pic series.

for i in $(seq -w 1 60)
do 
    convert -rotate ${i} orig-image.jpg pic_rotated_${i}.jpg
done

If you would like to have it left rotated, just put a - sign in the -rotate value.

for i in $(seq -w 1 60)
do 
    convert -rotate -${i} orig-image.jpg pic_rotated_${i}.jpg
done

I chose seq to generate the number series with leading zero which makes it easier to sort. One could also use {1..60} instead of $(seq...).

  • Ah, nine seconds before me. Should have answered before reviewing. – Anthon Sep 24 '17 at 9:38
0

Yes it is possible. If you need more information, lookup convert -rotate in the manual

0
convert input-file -rotate 1 output-file

Keep in mind though that this is a lossy conversion so don't keep rotating one image, rotate the original for each change of degrees.

  • Your recommendation is exactly what the answer by @thomas is already doing – Anthon Sep 24 '17 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.