How to rotate image using ImageMagick

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 6.8.9.9 and Ubuntu 15.10

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s