Page 1 of 1

Installing ImageMagick from source

Posted: 2016-10-17T04:15:20-07:00
by caster89
Hi everyone,
I tried installing ImageMagick on my Mac (OSX 10.9.5).My first attempt was to install the pre-built binary release on the download page, which gave me ImageMagick 7.0.1. Now while I was trying to use it I realised only some delegates were installed. in particular:
bzlib freetype jng jpeg lcms png
which means I was missing zlib, which apparently I need to work with png. So i tried to install from source. I downloaded ImageMagick 7.0.3-4, but if I do configure the only delegates it finds are:
bzlib mpeg ps tiff x
however I know there are more because in the X11 folder I can see quite a few extra (png for example).
I have the X11 folder in the /opt/X11 directory and Imagemagick in the /opt/IM/ImageMagick-7.0.3 directory. X11 is in the opt because that is the default directory for XQuartz
Why can't I get ImageMagic to recognise the other delegates?

Thank you very much,
Caster89

Re: Installing ImageMagick from source

Posted: 2016-10-17T09:20:29-07:00
by fmw42
I install all my delegates using MacPorts and then install IM from source. See viewtopic.php?f=1&t=21502&p=88202&hilit ... rts#p88202

Re: Installing ImageMagick from source

Posted: 2016-10-17T13:35:22-07:00
by caster89
Hi. Thanks I have actually seen your reply before in other pista. I do not have macports however, and am quite relucttant to installing it

Re: Installing ImageMagick from source

Posted: 2016-10-17T15:25:13-07:00
by fmw42
Your delegates need to be installed where IM is installed or use the items I have marked in blue to point to where they are in your ./configure command.

Also some delegates require other delegates to be pre-installed or it will fail to install properly. And those delegates may need others to be installed properly. That is why I use MacPorts to install delegates, since MacPorts keeps track of all the dependencies and installs them as needed.

Re: Installing ImageMagick from source

Posted: 2016-10-17T22:30:03-07:00
by caster89
Most of the delegates were already installed by XQuarts, so I was assuming the various dependencies had been taken care of. To install I used
./configure LDFLAGS='-L/opt/X11/lib' and CPPFLAGS='-I/opt/X11/include'
The only delegates I could not find, and which I installed by downloading them from the imagemagick ftp site, were the zlib, the tiff and the libjbig.
If I install Macports, can I choose the installation library?

Re: Installing ImageMagick from source

Posted: 2016-10-18T00:06:31-07:00
by fmw42
Did you install zlib, libtiff and the libjbig to /opt/X11/? If they did not go there, then that would explain it. You should check each configure log file to see if there are any errors.

If you install MacPorts, you can select any combination of delegates. There are often different variants for some of them (by date or version), so you can pick. I typically install the latest ones. But you can alway later tell MacPorts to update all of them. It will keep old copies on your system as uninstalled and you can then re-install older versions if you want or jump back and forth. You can remove the older ones if you want to, though.

I like doing it that way, since it becomes easy to update my delegates or add different ones later as I find I might need them and always be able to stay on the very latest version of Imagemagick. Often MacPorts versions are behind a few releases. So I just use MacPorts to have all my delegates and install IM from source manually.

If you want to install MacPorts version of Imagemagick, you can always tell it to include whatever delegates you want besides what it comes with at the time you install the MacPorts version of Imagemagick. So you have that option also to avoid the separate install of IM from source manually.

Other people do the latter using Homebrew or FINK.

Re: Installing ImageMagick from source

Posted: 2016-10-18T00:41:49-07:00
by caster89
Yeah I installed them in the /opt/X11 folder, and they appear to be there (for example there are the libz.1.2.8.dylib, libz.1.dylib,libz.a and libz.dylib files in there - the libz.1.dylib and libz.dylib are aliases to libz.1.2.8.dylib), but when I do the configure the libs delegate does not appear

Re: Installing ImageMagick from source

Posted: 2016-10-18T01:08:32-07:00
by fmw42
Sorry, I do not know what might be going wrong. Did you check your config.log file for each of these delegates to see that they had no errors for missing subordinate delegates?

Re: Installing ImageMagick from source

Posted: 2016-10-18T01:21:13-07:00
by caster89
Thank you very much anyways, I guess I'll download macports or home-brew and install the delegates somewhere with those and then try the manual IM install.
(There are no apparent errors in the delegates, I also did all the tests in the delegates in which I could find them and they were all good)

Re: Installing ImageMagick from source

Posted: 2016-10-18T01:23:10-07:00
by caster89
Sorry by the way what are the standard delegates?

Re: Installing ImageMagick from source

Posted: 2016-10-18T09:17:42-07:00
by fmw42
I suggest at least: libpng, libtiff, libjpeg, x11, fontconfig, freetype, lcms2, ghostscript, zlib

see http://www.imagemagick.org/download/delegates/

Re: Installing ImageMagick from source

Posted: 2016-10-18T23:39:48-07:00
by caster89
Hi thanks again. I caved and installed macports, I had initially decided to install the delegates and then install ImageMagick manually but since I wasn't finding all the right delegates I ended up installing ImageMagick +graphviz +gs +wmf +jbig +jpeg2 +lcms +zlib. I however noticed that Imagemagick on macports is 6.9.something, so maybe someday I might manually install the newer version.
For the time being these delegates do what I need (I had to make an animated gif from png images)
Thank you very much for your help

Re: Installing ImageMagick from source

Posted: 2016-10-19T00:38:11-07:00
by fmw42
Yes, as I mentioned earlier, MacPorts does not keep up with the current IM versions. I have had to ask them to update from time to time. So that is why I install IM from source pointing to /opt for my delegates from MacPorts.