Image Magick Usage Summary

Source: Internet
Author: User
Tags imagemagick

Using the image magick feeling very powerful.

Original address: http://blog.csdn.net/newborn2012/article/details/24964577

---------

ImageMagick Document: http://www.imagemagick.org/script/command-line-options.php

Convert powerful, used to batch image amplification, reduction, cropping, rotation, merging, watermark, splicing, format conversion, etc. are very convenient, especially for the background image processing. 1. Get picture information

[plain] view plain copy $identify image.png image.png png 559x559 559x559+0+0 8-bit SRGB 467KB 0.000u 0:00.008

If you only need to get a wide height:

[plain] view plain copy $identify-format "%wx%h" image.png

2, zoom in, Zoom out-resize

[plain] view plain copy $convert image.png-resize 200x200 resize.png

can also be scaled (halved):

[plain] view plain copy $convert image.png-resize 50% resize.png

You can also zoom in multiple times (half-scaled, then magnified one more time, the effect is blurred):

[plain] view plain copy $convert image.png-resize 50%-resize 200% resize.png

3, zooming in and out-sample differs from resize in that-sample is only sampled and not interpolated, so it is most appropriate to generate thumbnails [plain]   View Plain copy $convert  image.png -sample 50% sample.png   The effect of this process is mosaic: [ Plain]   View plain copy $convert  image.png -sample 10% -sample 1000%  sample.png   4, crop-crop to crop a 100x100-sized picture starting at (50,50) position: [plain]   View Plain Copy $convert  image.png -crop 100x100+50+50 crop.png   If you do not specify a location, The small picture is separated by this size, and this command generates CROP-0.PNG,CROP-1.PNG,CROP-2.PNG ... : [Plain]   View plain copy $convert  image.png -crop 100x100 crop.png    can specify the relative position of the clipping position-gravity: [plain]   View plain copy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.