{"id":1280,"date":"2010-05-11T21:01:02","date_gmt":"2010-05-11T20:01:02","guid":{"rendered":"http:\/\/www.maratz.com\/blog\/?p=1280"},"modified":"2015-03-03T08:54:50","modified_gmt":"2015-03-03T07:54:50","slug":"imagemagick-with-mamp","status":"publish","type":"post","link":"http:\/\/www.maratz.com\/blog\/archives\/2010\/05\/11\/imagemagick-with-mamp\/","title":{"rendered":"ImageMagick with MAMP"},"content":{"rendered":"<p>Many web designers and front-end developers use <a href=\"http:\/\/www.mamp.info\/\">MAMP<\/a> due to its ease of use. However, MAMP unfortunately doesn\u2019t come pre-installed with the very popular and wide spread image manipulation library <a href=\"http:\/\/www.imagemagick.org\/\">ImageMagick<\/a>. My fellow internet super talent <a href=\"http:\/\/twitter.com\/chevap\">Mario Lon\u010dari\u0107<\/a> recently clarified the steps for installing the ImageMagick library to your Mac installed with MAMP.<\/p>\n<p>This article is probably not one for the Terminal savvy programmers, but rather for the rest of us using drag and drop web server packages such as MAMP.<!--more--><\/p>\n<p>Prior to getting started, I\u2019m assuming you already have MAMP installed on your local computer, most likely in <code>\/Applications\/MAMP<\/code>. If not, install it before you move on to the next step.<\/p>\n<p><strong>First<\/strong>, download <a href=\"http:\/\/www.imagemagick.org\/script\/binary-releases.php?ImageMagick=sa2njjqr10qt376chb9at7fmm4#macosx\">ImageMagick for Mac OS X<\/a> and unarchive it to <code>\/Applications\/MAMP\/bin\/ImageMagick<\/code>.<\/p>\n<p><strong>Next<\/strong>, open up Terminal.app (don\u2019t be afraid, it won\u2019t bite you), and enter line by line:<\/p>\n<pre><code>$yourmacname> export MAGICK_HOME=\"\/Applications\/MAMP\/bin\/ImageMagick\/ImageMagick-6.6.1\"\r\n$yourmacname> export PATH=\"$MAGICK_HOME\/bin:$PATH\"\r\n$yourmacname> export DYLD_LIBRARY_PATH=\"$MAGICK_HOME\/lib\"<\/code><\/pre>\n<p><strong>Test<\/strong> if everything works up to this point:<\/p>\n<pre><code>$yourmacname> cd \/Applications\/MAMP\/bin\/ImageMagick\/ImageMagick-6.6.1\r\n$yourmacname> convert logo: logo.gif\r\n$yourmacname> identify logo.gif\r\n$yourmacname> display logo.gif<\/code><\/pre>\n<p><strong>Last<\/strong>: browse to <code>\/Applications\/MAMP\/Library\/bin<\/code> and open <code>envvars<\/code> file with your text editor. Change the two uncommented lines, i.e. <code>DYLD_LIBRARY_PATH=\"...<\/code> and <code>export...<\/code> to:<\/p>\n<pre><code>DYLD_LIBRARY_PATH=\"\/Applications\/MAMP\/bin\/ImageMagick\/ImageMagick-6.6.1\/lib:\/Applications\/MAMP\/Library\/lib:$DYLD_LIBRARY_PATH\"\r\nexport DYLD_LIBRARY_PATH<\/code><\/pre>\n<p>If you are using ImageMagick in your server-side application, be sure to set the correct path. For instance in PHP:<\/p>\n<pre><code>define('MAGICK_PATH', '\/Applications\/MAMP\/bin\/ImageMagick\/ImageMagick-6.6.1\/bin\/convert');<\/code><\/pre>\n<p>Restart Apache in MAMP and you\u2019re done.<\/p>\n<h3>Addenum<\/h3>\n<p>Some users have reported that the correct <code>DYLD_LIBRARY_PATH<\/code> for their particular setup was:<\/p>\n<pre><code>DYLD_LIBRARY_PATH=\"\/Applications\/MAMP\/bin\/ImageMagick\/ImageMagick-6.6.1\/lib:$DYLD_LIBRARY_PATH\"\r\nexport DYLD_LIBRARY_PATH<\/code><\/pre>\n<h3 id=\"update-yosemite\">Update for Mac OS X Yosemite users<\/h3>\n<p>If you had problems with starting Apache after updating to Yosemite, one of the proposed fixes was to rename <code>envvars<\/code> file to <code>_envvars<\/code> or to comment out lines containing <code>DYLD_LIBRARY_PATH<\/code>. That works if you don\u2019t need to use ImageMagick, but <code>DYLD_LIBRARY_PATH<\/code> is required for it to function properly.<\/p>\n<p>The solution is to rename <code>DYLD_LIBRARY_PATH<\/code> to <code>DYLD_FALLBACK_LIBRARY_PATH<\/code> in the <code>envvars<\/code> file.<\/p>\n<pre><code>DYLD_FALLBACK_LIBRARY_PATH =\"\/Applications\/MAMP\/bin\/ImageMagick\/ImageMagick-6.6.1\/lib:$DYLD_FALLBACK_LIBRARY_PATH\"\r\nexport DYLD_FALLBACK_LIBRARY_PATH<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Many web designers and front-end developers use MAMP due to its ease of use. However, MAMP unfortunately doesn\u2019t come pre-installed with the very popular and wide spread image manipulation library ImageMagick. My fellow internet super talent Mario Lon\u010dari\u0107 recently clarified the steps for installing the ImageMagick library to your Mac installed with MAMP. This article [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,17],"tags":[60,59],"_links":{"self":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/1280"}],"collection":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/comments?post=1280"}],"version-history":[{"count":7,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/1280\/revisions"}],"predecessor-version":[{"id":2769,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/posts\/1280\/revisions\/2769"}],"wp:attachment":[{"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/media?parent=1280"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/categories?post=1280"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.maratz.com\/blog\/wp-json\/wp\/v2\/tags?post=1280"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}