2014-05-30 11:27:55 -07:00
|
|
|
# convert
|
|
|
|
|
2021-05-20 16:13:41 -04:00
|
|
|
> ImageMagick image conversion tool.
|
2019-06-03 02:06:36 +02:00
|
|
|
> More information: <https://imagemagick.org/script/convert.php>.
|
2014-05-30 11:27:55 -07:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Convert an image from JPG to PNG:
|
2014-05-30 11:27:55 -07:00
|
|
|
|
|
|
|
`convert {{image.jpg}} {{image.png}}`
|
|
|
|
|
2017-11-24 16:19:06 +00:00
|
|
|
- Scale an image 50% its original size:
|
2014-05-30 11:27:55 -07:00
|
|
|
|
|
|
|
`convert {{image.png}} -resize 50% {{image2.png}}`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Scale an image keeping the original aspect ratio to a maximum dimension of 640x480:
|
2015-12-31 11:54:03 +01:00
|
|
|
|
|
|
|
`convert {{image.png}} -resize 640x480 {{image2.png}}`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Horizontally append images:
|
2014-05-30 11:27:55 -07:00
|
|
|
|
|
|
|
`convert {{image1.png}} {{image2.png}} {{image3.png}} +append {{image123.png}}`
|
2018-08-08 15:27:08 +10:00
|
|
|
|
2019-11-20 01:07:11 +08:00
|
|
|
- Vertically append images:
|
|
|
|
|
|
|
|
`convert {{image1.png}} {{image2.png}} {{image3.png}} -append {{image123.png}}`
|
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Create a GIF from a series of images with 100ms delay between them:
|
2018-08-08 15:27:08 +10:00
|
|
|
|
2020-06-01 20:57:34 +01:00
|
|
|
`convert {{image1.png}} {{image2.png}} {{image3.png}} -delay {{10}} {{animation.gif}}`
|
2019-04-04 09:48:37 +03:00
|
|
|
|
|
|
|
- Create an image with nothing but a solid background:
|
|
|
|
|
|
|
|
`convert -size {{800x600}} "xc:{{#ff0000}}" {{image.png}}`
|
2021-06-21 17:23:33 +10:00
|
|
|
|
|
|
|
- Create a favicon from several images of different sizes:
|
|
|
|
|
|
|
|
`convert {{image1.png}} {{image2.png}} {{image3.png}} {{image.ico}}`
|