razzi.abuissa.net

Razzi's guide to ImageMagick

ImageMagick is great for converting images and stuff… so you don’t have to go to an image conversion site and do the upload/download dance.

install

$ sudo apt install imagemagick

change an image type

$ convert image.webp image.png

resize by percentage

$ convert image.png -resize 50% shrunk-image.png

resize to pixel value

$ convert image.png -resize 200 image-200px.png

This is all for ImageMagick v6. Apparently ImageMagick v7 is out but Ubuntu is still distributing ImageMagick version 6 so that’ll do for now.

In v7 apparently the command switched from convert to magick. Now you know!

source code

https://github.com/ImageMagick/ImageMagick