O'Reilly logo

ImageMagick Tricks by Sohail Salehi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basic Transformations

Another important part of ImageMagick options is transformation commands. In this section we will see their syntax and usage. With these transformations we can rotate, resize, crop, change canvas, skew, flip vertically and horizontally, and roll our artworks. Let's see these commands in action.

How to Rotate Drawings in ImageMagick

With the help of the rotate option we can make our desired rotation in the convert command. Here it is the option format:

-rotate deg {<}{>}

Use positive and negative degrees for rotating clockwise and counter‑clockwise respectively.

Note

If you set the> operator in front of this option the rotation will be performed only if the image width exceeds the height. Use< for situations where you want ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required