Search code examples
ruby-on-railsimagemagickrmagickimagemagick-convert

Trouble Installing ImageMagick for Windows


I just downloaded ImageMagick but am not sure if it's working. I typed in 'which convert' into my terminal and nothing happened. I also tried typing in 'convert logo: logo.gif' then 'identify logo.gif' and lastly 'display logo.gif' and nothing seemed to happen (these three commands were specified on Windows).

Then I tried following this video: http://www.youtube.com/watch?v=gEWAVlNCKhg

However, it still didn't work and on the last step of the video. I got the following error: ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: ----with-opt-include=C:/ImageMagick/SourceCode

Can anyone advise on how to correctly install imagemagick on windows or what these errors mean?


Solution

  • That video has a bunch of unnecessary stuff if all you want to do is get ImageMagick working as a standalone product on Windows. All you need to do is:

    1. Download latest Windows binary from imagemagick.org. Right now, that file is located here.
    2. Run the installer (leave all default values the way they are)
    3. Open a command prompt (Start --> Run --> cmd.exe)
    4. Navigate to the ImageMagick folder in the command prompt window. For the default install path, this is done as follows :
    5. Change to the root directory of the C: drive (type cd\ followed by the enter key)
    6. Change to the ImageMagick folder (type cd "Program Files\ImageMagick-6.8.6-Q16" followed by the enter key)
    7. Test that it's working with the convert command: convert images\logo.jpg logo.gif
    8. Look at the directory listing and check the for a logo.gif file with the current time/datestamp (dir logo.gif, followed by enter key).

    Note: when you run the convert command, there will not be any output to the command prompt unless you turn on the verbose flag e.g. (convert -verbose images\logo.jpg logo.gif)