ImageMagick command line usage

Source: Internet
Author: User
Tags imagemagick

Convert.exe
Simplest usage: convert.exe aaa.jpg aaa.png
Parameters that may be used (I will not explain them if they are useless, but there are too many parameters ):
-Layers flatten: it is used to merge multiple layers into one layer when converting the PSD file. Otherwise, multiple PSD images will appear when converting multiple layers, each of which corresponds to one layer.
Example: convert.exe-layers flatten AAA. PSD aaa.jpg

-Density 72: Specifies the resolution of the image, that is, the number of pixels per unit area. If you do not know this, it is incorrect. The default unit is inch.

-Units pixelsperinch: Specifies the Unit. This parameter is used with-density to specify the unit of-density. This is very important. I found that the resolution unit of some images is centimeter, the two units are far behind each other.
Example: convert.exe-density 72-units pixelsperinch AAA. tif aaa.jpg

-Resize 1024x768: Specifies the image conversion size. Im will automatically determine the width and height of the image for proportional compression. But there is a problem, that is, when the image is smaller than x768, the image will be forcibly zoomed in. You can add delimiters such as '>' and '<' After x768 to restrict conversion behavior. 1024x768> only converts a graph larger than 1024x768 <only converts a graph smaller than X. For other delimiters, see the manual.
Example: convert.exe-resize "1024x768>" AAA. tif aaa.jpg
Note: 1024x768> must be enclosed in quotation marks. Otherwise, '>' is interpreted as output redirection.

-Filter Lanczos: Specifies the filter used to convert an image. It is usually used with-resize. There are many kinds of filters. After one try, I think this is suitable and others do not understand it.

-Quality 100: Specifies the JPEG image quality compression ratio. The default value is 80%. Here we specify 100%, which is the best quality.

-Colorspace RGB: Specifies the color space of the converted image. There is a lot of color space, and the use of RGB on the PC is sufficient.

+ Profile "*": deletes metadata information attached to an image, including EXIF. This data occupies a lot of space, so you can directly delete it.

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.