My most used ImageMagick commands

Merge pictures with ImageMagic


magick convert 1.png 2.png -append output-v.png


magick convert 1.png 2.png +append output-h.png

Convert PDF to JPG

To do this with ImageMagic you will need to have Ghostscript installed so it makes more sense to just use Ghostscript instead as this will be quicker also. Anyway here are commands for both that will achieve the same.

magick convert -verbose -density 300 -trim input.pdf -quality 100 -flatten -sharpen 0x1.0 image.jpg
gswin64c.exe -dNOPAUSE -sDEVICE=jpeg -r300 -dJPEGQ=100 -sOutputFile=1.jpg input.pdf -dBATCH

Add border to an image

magick convert img.jpg -bordercolor black -border 20 result.jpg

Add drop shadow to image:

magick convert input.png ( +clone -background black -shadow 60x3+2+2 ) +swap -background none -layers merge +repage output.png