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