How to use convert command
Theconvert command is a command line tool in the ImageMagick image processing software package, used for image format conversion, image processing, image synthesis and other operations. Common usage: 1. Simple image format conversion: convert input.jpg output.png; 2. Adjust image size: convert input.jpg -resize 800x600 output.jpg; 3. Image cropping, etc.
The convert command is a command line tool in the ImageMagick image processing software package, used for image format conversion, image processing, image synthesis and other operations. Here are some common usage examples of the convert command:
-
Simple image format conversion:
convert input.jpg output.png
Copy after loginConvert the input.jpg image to the output.png image, which can be done according to the file The extension automatically recognizes input and output image formats.
-
Resize the image:
convert input.jpg -resize 800x600 output.jpg
Copy after loginResize the input.jpg image to an image with a width of 800 pixels and a height of 600 pixels, and save it as output.jpg.
-
Image cropping:
convert input.jpg -crop 200x200+50+50 output.jpg
Copy after loginCut out an area with a width of 200 pixels and a height of 200 pixels from the input.jpg image. The starting point coordinates are (50, 50) and save it as output.jpg.
-
Image rotation:
convert input.jpg -rotate 90 output.jpg
Copy after loginRotate the input.jpg image 90 degrees counterclockwise and save it as output.jpg.
-
Add text watermark:
convert input.jpg -pointsize 24 -fill black -annotate +100+100 "Watermark" output.jpg
Copy after loginAdd a black text watermark "Watermark" on the input.jpg image, the position is (100, 100), and save it as output.jpg.
These are just some common usage examples of the convert command, in fact it supports numerous image processing operations and options. You can view more detailed help documentation through the convert --help command, or refer to the official ImageMagick documentation for more usage and options.
The above is the detailed content of How to use convert command. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

