ImageMagick usage notes

Source: Internet
Author: User
Tags imagemagick
ImageMagick is an open-source and powerful command line Image processing tool. Here you can learn about ImageMagick. Recently, many batch image processing work has been involved. using this tool, we feel that its functions are very powerful and convenient. we will record the functions used as follows...

ImageMagick is an open-source and powerful command line Image processing tool. Here you can learn about ImageMagick.

Recently, many batch image processing jobs have been involved. using this tool, I feel that it is very powerful and convenient. I have recorded the features currently used as follows: working platform: Ubuntu 10.04:

1. use the convert command to change the image size.


1.1. maintain the ratio of length to width and the height is changed to 256:
For jpgfile in 'Ls'; do convert $ jpgfile-resize x256 new _ $ jpgfile; done

1.2. the length and width are reduced to 50% of the original size.
For jpgfile in 'Ls'; do convert $ jpgfile-resize % 50 new _ $ jpgfile; done

 

2. splice two images and run the convert command.

 

2.1 horizontal stitching

Convert 1.jpg 2.jpg 3.jpg + append result.jpg

2.2 Longitudinal stitching

Convert 1.jpg 2.jpg 3.jpg-append result.jpg

 

3. obtain image information and use the Identify command.

3.1 retrieve image width and height

 

Identify test.png | cut-d ''-f 3 | cut-d 'X'-f 1

Identify test.png | cut-d ''-f 3 | cut-d 'X'-f 2


Of course, more powerful functions of ImageMagick have not been used yet, so I will continue to summarize them.

 

Author: Peacock

Related Article

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.