How to install ImageMagick in Mac for simple task (R) - macos

I have a simple task I want to carry out and after exhausting all resources on google I'm stumped. I think whats hindering me most is installing ImageMagick. When I used my terminal I get errors. All I want to do is make some plots on R and make a GIF out of them. Is there anyone way to confirm ImageMagick is installed?

In general you will need either MacPorts or Homebrew installed first to install ImageMagick. As you stated above it sounds like you don't have Macports installed.
If you don't have either installed, I'm a big fan of homebrew, and so I'll walk your through install with homebrew.
Step 1. First install homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
as per the homebrew website here.
Once that's done installing you'll then be able to use commands like brew install foo where foo is something you'd like to install. In your example you see port install imagemagick which is the Macports way of installing image magick.
Step 2. Install imagemagick. As per ImageMagick Mountain Lion instructions here:
brew install imagemagick
That command should install imagemagick. A super handy tool with homebrew is brew doctor which analyses all the installs you've done with homebrew to make sure they'll properly setup.

Related

pdf2swf not installed through Homebrew – but the rest of swftools are

Environment OSX 10.9.5
I am trying to install swftools so that I can use pdf2swf. I am installing through HomeBrew. I've seen various notes about pdf2swf failing to install if its dependencies have not been previously installed. So using the command at the link I use:
$ brew install freetype libjpeg giflib swftools
And it completes without error – except pdf2swf is not installed. When I look in usr/local/bin, I see the other swftools are installed successfully.
Does anyone know what might be wrong?
Update: For completeness if anyone comes across this question looking to use pdf2swf in an AIR desktop app: you can't. Apparently pdf2swf compiles the swf with certain "AllowDomain" security settings and there is no option to not do that. Short of editing the source code and compiling pdf2swf oneself, it seems a deadend.
If you look at the brew formula: brew edit swftools, PDF support comes via xpdf and this is not included by default as XQuartz needs to be installed:
brew instal swftools --with-xpdf
swftools: XQuartz is required to install this formula.
You can install with Homebrew Cask:
brew install Caskroom/cask/xquartz
You can download from:
https://xquartz.macosforge.org
Error: An unsatisfied requirement failed this build.
So:
Install XQuartz
brew install swftools --with-xpdf

Installing GLFW on OSX

I've been all over the internet and I simply cannot find a way to install GLFW for OSX and use it with Xcode. A lot of articles use cmake for this, which I tried to install but I still can't access it from the terminal.
I just need a simple step-by-step guide for installing it because I'm going to lose my mind.
Thanks
I use homebrew to install GLFW. Once brew has been configured, use the commands
brew tap homebrew/versions
brew install --build-bottle --static glfw2
If you are still running into trouble with this and want to use homebrew, change the install command to reflect the newer GLFW version (3 as of this writing)
brew tap homebrew/versions
brew install --build-bottle --static glfw3

How can I install GNU Octave on Mac with Fink ?

I tried to install GNU Octave on my Mac using Fink by this instruction
http://wiki.octave.org/Octave_for_MacOS_X
I think I have followed all the instructions but I can't run Octave.
How can I check if it is installed correctly?
I tried typing 'octave' in the terminal but it says 'command not found'
Or, is there any easy instruction for Octave installation?
I've found many install guides but they are all different and assumes some knowledge.
Incidentally, I have installed Octave GNU today twice on two different machines (both running Lion).
I needed the latest version of Octave (3.6.4), and used Homebrew.
I already had XCode installed, so the rest:
Install Homebrew
Based on the instructions in this page, I ran:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Install Octave
Following this guide, I ran:
brew tap homebrew/science
brew update && brew upgrade
brew install gfortran
brew install octave
Install AquaTerm
Notice that you need this before you install gnuplot (or gnuplot won't see aqua as a valid terminal and you may get 'unknown or ambiguous terminal type' error).
Simply downloaded the latest version (1.1.0) dmg from SourceForge.
Install gnuplot
brew install gnuplot
You could try installing it with Home Brew. Once you download and install Home Brew, use this guide to get Octave installed.
Easiest option would be using the precompilled .app
I've tried the precompiled .app, but had issues with certain functions (like sound),
whereas the macports version always worked.
I usually install it using macports:
sudo port install octave
for the basics.
You might need other port variants/octave modules installed:
sudo port install octave octave-signal octave-plot octave-image octave-signal
Need to have XCode with Command Line Tools first and Macports with this route though
How to know if a Fink package is installed
By default (and this should be your case too if you didn't changed it), Fink installs everything under /sw, i.e. the binaries you are looking for should be in /sw/bin/.
Run ls /sw/bin/octave*and, depending on the output, you then have two choices :
Either the Octave binary is inside /sw/bin, in that case run echo $PATH and learn more about PATH Variable to fix your problem.
Otherwise, if there is nothing inside, there might have been a problem with the install. Try running fink install octave once more, look closely at the output and update your post if necessary.
This is simply an update on the instruction provided by Izhaki (that I ran on Mac OSX 10.8.4).
You may be required to update XCode to 4.6.3. This can be done through the AppStore.
If you encounter the error:
Error: Download failed: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz
during
brew install octave
Then invoke:
brew update
brew install octave
and the install will pick up where it left off. Other than that, the instruction worked seamlessly.

How to tell RMagick which ImageMagick too use? [duplicate]

I am getting following error while running local script/server of my Rails project:
This installation of RMagick was configured with ImageMagick 6.6.1 but ImageMagick 6.4.5 is in use. (RuntimeError)
Running identify --version shows the following:
Version: ImageMagick 6.6.1-10 2010-05-21 Q8 http://www.imagemagick.org
So, my question is how and where should I make changes to work it fine; I have already reinstalled ImageMagick but that didn't work.
the same thing happened to me but the solution was a bit simpler than uninstalling imageMagick. It sounds like Rmagick's config file isn't updated to use your updated imagemagick so try
sudo gem uninstall rmagick
sudo gem install rmagick
restart your server.
I took a closer look and noticed you had Rmagick configured for a newer imageMagick but using an older imageMagick. So I would assume that my solution would still work but you would not be using the newer ImageMagick.
If using bundler:
bundle exec gem uninstall rmagick
bundle install (will reinstall rmagick as part of the bundle)
I would remove any previous installation and start again by following this page.
First of all open a shell and launch:
identify -version
which will give you the IM version installed on your system.
Depending on how You installed IM, find the way to remove It completely from the system. For instance if you used apt-get, try:
sudo apt-get remove ImageMagick
If you installed IM from sources, go to where you have them stored (I mean the sources path/folder) and type:
make uninstall
You can then reinstall ImageMagick, compiling it from the sources:
cd
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar zxf ImageMagick.tar.gz
cd ImageMagick-*/
./configure --prefix=$HOME --without-perl
make
make install
Then you have to add $HOME/bin to the beginning of your $PATH
cd
echo "export PATH=$HOME/bin:\$PATH" >> .bash_profile
source .bash_profile
Now it's time to gem install RMagick:
export LD_LIBRARY_PATH=$HOME/lib
gem install rmagick
RMAGICK_BYPASS_VERSION_TEST = true
Thats a global flag set before requiring rmagick.
from
https://bugs.launchpad.net/ubuntu/+source/librmagick-ruby/+bug/565461/comments/2
Worked and tested ok for me.
I made it work by uninstalling and then deleting the file listed in the error message (before reinstalling). It seems that uninstalling doesn't always clean up some of the old ".so" files.
I had the same issue, and eventually concluded that my installation of libmagick9-dev
(sudo apt-get install libmagick9-dev ruby1.8-dev) was installing ImageMagick APIs for the lower version. My solution was to uninstall the later versions and go with the Ubuntu packaged versions of ImageMagick and the other libraries.
I bumped into this on a Rails app. I tried Scott Montgomerie's answer, but I couldn't get bundle exec gem to work (not sure why, no time to find out).
What worked for me was a simple bundle update rmagick.
bundle update rmagick worked for me

How to Install imagemagick 8-bit depth with homebrew

I'm using Mac Lion with RVM, homebrew and bundler and the rmagick gem
When I execute the following command:
brew install imagemagick
convert --version
the imagemagick version that is installed is Q16 (16-bit depth) , but I prefer the 8-bit depth version for speed reasons.
what is the correct brew command to achieve this?
I realised homebrew formula's are just ruby scripts, so searched for the imagemagick formula.
locate imagemagick.rb
So you can see all the available options in the options method in:
/usr/local/Library/Formula/imagemagick.rb
So in the end, it was just a simple
brew install imagemagick --with-quantum-depth-8
See also homebrew install imagemagick 8 bit version
UPDATE for brew 2
Brew version 2 does not allow additional compile (./configure) settings anymore. You now have to edit the fromula yourself and recompile.
Open and edit the brew formula
brew edit imagemagick
Add the following line under the args = %W[ section
--with-quantum-depth=8
Then install and coile with -s
brew install imagemagick -s
Then test your new installation of ImageMagick with
convert --version
You will see the Q8 on the first line after the version number.
P.S.
if you use rmagick, and just changed your ImageMagick, make sure you gem uninstall rmagick && bundle install

Resources