ImageMagick
ImageMagick is one of the excellent tools for image compression.
What is ImageMagick?
- ImageMagick (Official): https://imagemagick.org/index.php
- Free and open-source software used for editing and manipulating digital images.
- Can be used to create, edit, compose, and convert bitmap images.

Test Environment
- PC: MacBook Pro (16-inch, 2019)
- OS: Sonoma 14.7.2
- Terminal: zsh
Installation
Open Terminal and install ImageMagick using the package manager Homebrew
brew install imagemagickCheck version
magick --version
The Neil’s encoding introduced in FabAcademy is as follows.
Neil’s encoding
- list formats:
- convert -list format
- JPG: high compressed
- PNG: less compressed
convert PNG to JPG:
convert input.png output.jpgconvert all PNGs to JPGs:
mogrify -format jpg *.pngconvert SVG to PNG at 1000 DPI:
convert -density 1000 -units PixelsPerInch input.svg output.pngcompress JPG to quality 50% width 1000:
convert input.jpg -quality 50% -resize 1000 output.jpgcompress all JPGs to quality 50% width 1000:
mogrify -quality 50% -resize 1000 *.jpgContact
If you have any questions about using ImageMagick, please feel free to ask our staff.
