My most used ImageMagick commands

Merge pictures with ImageMagic

Vertically:

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

Horizontally:

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

Sources:

https://stackoverflow.com/questions/20075087/how-to-merge-images-in-linux-command-line

https://stackoverflow.com/questions/6605006/convert-pdf-to-image-with-high-resolution

https://stackoverflow.com/questions/6233400/how-do-you-convert-pdfs-to-pngs-with-ghostscript

https://stackoverflow.com/questions/32466112/imagemagick-convert-pdf-to-jpeg-failedtoexecutecommand-gswin32c-exe-pdfdel

https://www.prepressure.com/library/paper-size/din-a3