When an image is rotated by convert -rotate
command the image size is enlarged. Is there a way to rotate around the center and to keep the image size, cropping the edges?
A rotation is a type of transformation which is a turn. A figure can be turned clockwise or counterclockwise on the coordinate plane. In both transformations the size and shape of the figure stays exactly the same.
There are a few different ways that you can rotate an image in Photoshop without rotating the canvas. One way is to go to Image > Image Rotation > 180. This will rotate the image clockwise by 180 degrees. Another way is to go to Edit > Transform > Rotate 90 CW.
convert image.jpg -distort SRT -45 rotate_cropped_image.png
See http://www.imagemagick.org/Usage/warping/#animations
Example:
See also help on -distort: http://www.imagemagick.org/script/command-line-options.php?#distort
This seems now to simply "just work" -- for counter-clockwise 90 degrees:
$ convert image.jpg -rotate -90 rotated_ccw.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With