-Mac OS 10.13 High Sierra does not include X11 as standard, so install it separately. Reference: http://macperson.net/mac-x11-xquartz/
-Install the library to execute the necessary commands with ImageMagick + im4java library in advance.
brew uninstall jpeg brew install jpeg brew install libjpeg brew install jpeg-turbo brew uninstall jpegoptim brew install jpegoptim
-ImageMagick is installed as a package instead of brew If there is a version folder under / usr / local / Cellar / imagemagick /, uninstall it because there is one that was put in with brew.
brew uninstall imagemagick
-Install ImageMagick as a package Reference: http://cactuslab.com/imagemagick/ Installed as a package installs in / opt / ImageMagick
-Create a symbolic link for the execution command of / opt / ImageMagick / bin under / usr / local / bin
cd /usr/local/bin/
ln -s /opt/ImageMagick/bin/animate animate ln -s /opt/ImageMagick/bin/compare compare ln -s /opt/ImageMagick/bin/composite composite ln -s /opt/ImageMagick/bin/conjure conjure ln -s /opt/ImageMagick/bin/convert convert ln -s /opt/ImageMagick/bin/display display ln -s /opt/ImageMagick/bin/identify identify ln -s /opt/ImageMagick/bin/import import ln -s /opt/ImageMagick/bin/mogrify mogrify ln -s /opt/ImageMagick/bin/montage montage ln -s /opt/ImageMagick/bin/stream stream
Now if you pass / usr / local / bin to im4java and run it, the conversion method will work on Mac as well.
Reference: https://qiita.com/yaoki_dokidoki/items/2ec0540b67dcb4abd5cb
Recommended Posts