admin:linux:cli:imagemagick

Imagemagick

convert convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.
identify describes the format and characteristics of one or more image files.

(manpage)

Option Wirkung
-alpha remove entfernt Transparenz
-background white setzt weißen Hintergrund
-trim schneidet den Rand des Bildes weg
# general JPG to PDF
convert img1 img2 img3 ... out.pdf

# multiple JPGs to one PDF
convert -append img1 img2 img3 ... out.pdf

(Quelle [reddit])

# convert page 17 in 300dpi
convert -density 300 input.pdf[16] output.jpg
find -name "*.jpg" -exec mogrify -resize 75% -quality 80 {} \;
find -name "*.jpg" -exec mogrify -strip {} \;
  • Last modified: 2019-12-20 14:21