Simple Docker image for hustle-free image conversions with ImageMagick.
First, pull the image:
docker pull madhead/imagemagick:latest
Then, do the simple conversions like:
docker run --rm -it -v $(pwd):/src -v $(pwd):/out --user=$(id -u):$(id -g) madhead/imagemagick convert /src/image.svg /out/image.png
or more sophisticated ones:
docker run --rm -it -v $(pwd):/src -v $(pwd):/out --user=$(id -u):$(id -g) madhead/imagemagick convert -density 300 /src/document.pdf -background white -alpha remove -quality 90 /out/document.png
Read about the available flags, options and switches in the official ImageMagick documentation. Ubuntu’s manpage is great as well. Docker options are described in details on their site.
Do not hesitate to open an issue in case you notice any bugs or missing conversion tools or features. Read the contributing guide if you know how to hack and make the image better.