Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to rotate image using ImageMagick

📅 2016-Jul-05 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ convert, imagemagick, mogrify, rotate ⬩ 📚 Archive

Rotating images from the shell is easy with ImageMagick tools.

To rotate 90 degrees clockwise and write output as new file:

$ convert -rotate "90" in.jpg out.jpg

To rotate 45 degrees counter-clockwise and overwrite the input file:

$ mogrify -rotate "-45" foo.jpg

Tried with: ImageMagick and Ubuntu 15.10