simonthompson99
9/23/2019 - 3:24 PM

Imagemagick One-liners

[Imagemagick One-liners] Onelines for Imagemagick for image manipulation #imagemagick #oneliner

# make white transparent
convert <in>.png -transparent white <out>.png

# change image to a4-sized pdf
convert -density 300 -page a4 <in>.png <out>.pdf

# remove large white backgrounds from multiple images
mogrify -trim +repage *.png

# make image grayscale
convert <in.png> -tyep Grayscale <out.png>

# resize images to a set proportion ignoring proportion
mogrify -resize 300x300! *.png

# get a montage of images with no 2 pixel space between
montage *.png -geometry +2+2 out.png