Add the package with
ImageMagick will be used as needed if you've said
in your session or module. You should not generally say
using ImageMagick. See FileIO for
It's worth pointing out that packages such as Images.jl load FileIO for you.
Loading an image is then as simple as
img = load(filename[; view=false])
view=true to reduce memory consumption when loading large files, possibly
at some slight cost in terms of performance of future operations.
ImageMagick.jl will use the system-wide libMagicWand in
/usr/local/lib if it is
present. Use the environment variable
MAGICK_HOME to add other paths to the search
path. Note that version 6.7+ (up to but not including 7.0) are the most supported versions, in
particular for multipage TIFFs. Use
ImageMagick.libversion to see what version the installer
found. If ImageMagick.jl doesn't find a previous installation, it will install its own copy of the
ImageMagick library with Homebrew.jl.
ImageMagick.jl 0.3.0 introduced significant improvements in the installation procedure for OSX users. If you've had trouble with previous versions of ImageMagick.jl and attempted to resolve problems manually, some of your workarounds might interfere with the new approach. You can reset your build with
using Homebrew Homebrew.rm("imagemagick@6") Homebrew.brew(`prune`) Pkg.build("ImageMagick")
You may also find debugging Homebrew useful.
Finally, an alternative to ImageMagick on OS X is QuartzImageIO.
Manual installation on Windows
If automatic installation fails, get the current version from
(e.g. ImageMagick-6.8.8-7-Q16-x86-dll.exe) and make sure that the "Install
development headers and libraries for C and C++" checkbox is selected. You may
choose to let the installer add the installation directory to the system path or
provide it separately. In the later case you may add it to your
file as (for example)
push!(Base.DL_LOAD_PATH, "C:/programs/ImageMagick-6.8.8"). Alternatively, you can set your
MAGICK_HOME environment variable.
When manual intervention is necessary, you need to restart Julia for the necessary changes to take effect.
ImageMagick.jl automatically searches for an installed version of
libMagickWand. Use the environment variable
MAGICK_HOME to add to the search
ImageMagick.libversion() to see what version it found. Version 6.7+
(up to but not including 7.0) are the most supported versions, in particular
for multipage TIFFs.
The environment variable
MAGICK_THREAD_LIMIT can be used to throttle multithreading.