science:applied:info-tech:imagemagick

ImageMagick

ImageMagick is a command-line tool for processing image files.

This tool is not suitable for processing RAW images; darktable is recommended instead.

environmentcommand
archlinuxpacman -S imagemagick
mingw-w64pacman -S mingw-w64-i686-imagemagick
brew on macbrew install imagemagick

Please note that you must also install libraries to handle specific image formats.

formatrequired library
webplibwebp
convert src.png [options] dst.jpg  # output format is recognized by an extension
optiontarget formatdescription
-auto-orient*Rotates the raw image according to the metadata orientation, and removes the orientation tag.
-resize X%*Resize the image by the specified percentage.
-strip*Removes any metadata.
-define webp:method=NwebpQuality of webp format(1~6).
A higher value results in stronger compression and lower quality.
convert $i -define webp:method=6 -resize 15% -auto-orient -strip ${i%.jpg}.webp
  • Last modified: 8 days ago
  • by falsycat