ImageMagick: Cropping images

Posted Over 9 years ago. Visible to the public.

ImageMagick takes a string with several options when cropping an image. See the command line options for how to provide the expected image geometry Show archive.org snapshot for details.

Note that ImageMagick tends to preserve the original aspect ratio of the source image automatically.

Examples:

  • crop 200x200 means Maximum values of height and width given, aspect ratio preserved.
  • crop 200x200! means Width and height emphatically given, original aspect ratio ignored.
Thomas Klemm
Last edit
Over 9 years ago
Thomas Klemm
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Klemm to makandra dev (2015-01-19 10:39)