3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS で ImageMagick + im4java を動かすための準備

Posted at

・Mac OS 10.13 High Sierra では X11 が標準で入っていないので個別インストール
参考:http://macperson.net/mac-x11-xquartz/

・ImageMagick + im4javaライブラリで必要なコマンドを実行するためのライブラリを事前にインストール

brew uninstall jpeg
brew install jpeg
brew install libjpeg
brew install jpeg-turbo
brew uninstall jpegoptim
brew install jpegoptim

・ImageMagick は brew ではなくパッケージでインストール
/usr/local/Cellar/imagemagick/ 配下にバージョンフォルダがあったら brew で入れたものがあるのでアンインストール

brew uninstall imagemagick

・パッケージで ImageMagick をインストール
参考:http://cactuslab.com/imagemagick/
パッケージでインストールすると /opt/ImageMagick にインストールされる

・/usr/local/bin 配下に /opt/ImageMagick/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

これで im4java へ /usr/local/bin を渡して実行すると変換メソッドが Mac でも動くようになる

参考:https://qiita.com/yaoki_dokidoki/items/2ec0540b67dcb4abd5cb

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?