In general, to use ImageMagick with X11, you will probably be most likely to succeed if you follow the following steps:
Step 1 - Install or update Xcode command line tools
It is important that your developer tools are up-to-date, especially if you have updated your macOS version since setting them up originally. You can do this with:
xcode-select --install
Step 2 - Ensure ImageMagick is correctly installed
The easiest way to do this is first to ensure that old versions of ImageMagick are removed and cleaned up and that you then install (or re-install) with the latest version:
brew update # update homebrew itself
brew rm imagemagick # remove old IM versions
brew install imagemagick --with-x11 # install latest IM version including X11 support
Step 3 - Check
If you have been trying for ages to install ImageMagick, you may have left some old versions lying around. It is important that you use the homebrew-installed version in /usr/local/bin
, so check you are running the version you expect with the following:
which convert # should report "/usr/local/bin/convert"
which magick # should report "/usr/local/bin/magick"
identify -version # should report same version as next command
brew info imagemagick
Step 4 - Start X11
Start X11, it is probably easiest to fire up xclock
, which not only starts X11, but also checks everything X11 is running and your X11 environment is configured correctly:
xclock &
Step 5 - Run ImageMagick X11
Now you can test your ImageMagick configuration, without needing any test images as follows - since the wizard:
image is built-in:
display wizard:
xcode-select --install
. Then try the homebrew installation again. – Mark Setchell Jun 19 '17 at 7:59xcode-select --install
since any OS upgrades. Next, I would dobrew update; brew rm imagemagick; brew install imagemagick --with-x11
– Mark Setchell Jun 19 '17 at 17:17identify -version
and check you get exactly the same version as when you runbrew info imagemagick
. Alsowhich convert
should tell you/usr/local/bin/convert
– Mark Setchell Jun 19 '17 at 17:21xclock &
before you use ImageMagick to make sure your X11 environment is working and able to display X11 windows. – Mark Setchell Jun 19 '17 at 20:20