ImageMagick Install Windows

亡梦爱人 提交于 2019-12-30 03:19:05

问题


I am trying to install ImageMagick on Windows. What I did is install Windows RailsInstaller created my version and now I need to use ImageMagick but for some reason it doesn't work.

I took the binary source code and install and run it from this page but didn't seem to do the trick http://www.imagemagick.org/script/binary-releases.php#windows

I also try the following http://www.youtube.com/watch?v=gEWAVlNCKhg but it doesn't work

For the first example In cmd all I have to do is the following command to my understand to make it work here what I get

C:\Sites\case>convert wizard: wizard.jpg
Invalid Parameter - wizard.jpg

C:\Sites\case>convert wizard.jpg
Invalid drive specification.

C:\Sites\case>convert logo: logo.gif
Invalid Parameter - logo.gif

C:\Sites\case>$ convert logo: logo.gif
'$' is not recognized as an internal or external command,
operable program or batch file.

C:\Sites\case>

Then i saw this. From the https://github.com/rmagick/rmagick which state it include rmagick but then i run bundle and get this

Installing rmagick (2.13.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
Invalid drive specification.
Unable to get ImageMagick version
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/RailsInstaller/Ruby1.9.3/bin/ruby


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/rmagick-2.13.2 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rmagick-2
.13.2/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.2), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.

Thank for any help.


回答1:


Here yo go, to install ImageMagick and build the RMagick gem and make it all work.

Follow below steps:

  1. Go here mirror images.
  2. Download ImageMagick of any version except the currently latest release, which has some issues
  3. Install it with options: Add to PATH and development headers. Installation path should not contain spaces.
  4. In the command line type convert -version to check if everything works. It should print something like:

    Version: ImageMagick 6.6.1-10 2010-05-15 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC Features: OpenMP

  5. Install the DevKit if you haven't already.

  6. Install the rmagick gem: gem install rmagick --platform=ruby -- --with-opt-lib=c:/ruby192/ImageMagick/lib --with-opt-include=c:/ruby192/ImageMagick/include

(Making sure the paths point to wherever you installed imagemagick)

It should print

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...

And after a few minutes if everything goes right, you should see

Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...
Installing RDoc documentation for rmagick-2.13.1...

And that's it. Just two more links that were helpful: 1 blog and 2 blog if you still can't install




回答2:


  • The first one is a path issue. There is a convert.exe that is getting found before the ImageMagick one.
  • The second one is because you don't have working build tools.



回答3:


How to install ImageMagick on Windows 8.1, as of 5/1/2017:

  1. take a deep breath

  2. uninstall imagemagick/rmagick/everything that's failed so far

  3. make sure you have the DevKit that the accepted answer linked to

  4. Don't download the current v7 of ImageMagick. I have no idea why, but it doesn't work. Instead download ImageMagick-6.9.8-4-Q16-x86-dll.exe from here

  5. Install, including the headers. Since it's V6, it includes legacy utilities already so you don't have to worry about that. Install into your C: directory so there are no spaces in the path.
  6. Open up your environment variables. You know, System>advanced system settings>environment variables.
  7. Find PATH in system variables, edit and copy and paste the large variable value into a notepad or something so you can read it properly.
  8. Find ImageMagick's path, cut it out and paste it to the front. My PATH starts with "C:\ImageMagick-6.9.8-Q16;..." If it's not there, add it yourself.
  9. Update your PATH with ImageMagick at the front.
  10. You should be all setup, go into command prompt and type "convert -version". Rather than a "Invalid drive specification" result which drove me insane, you should see the current version specifications.
  11. Bobs your uncle, you have ImageMagick!



回答4:


There is it better described: http://www.redmine.org/projects/redmine/wiki/HowTo_install_rmagick_gem_on_Windows




回答5:


this is the only approach that worked for me:

http://rails.webintellix.com/2010/01/04/how-to-install-rmagick-imagemagick-on-windows/




回答6:


Install ImageMagick windows binaries from https://sourceforge.net/projects/imagemagick/files/im6-exes/, findout where is it installed

Like

C:\Program Files (x86)\ImageMagick-6.7.9-Q16

or some other directory, depending upon your system...

And run following commands in command prompt

set CPATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\include
set LIBRARY_PATH=C:\Program Files (x86)\ImageMagick-6.7.9-Q16\lib
gem install rmagick

Replacing

C:\Program Files (x86)\ImageMagick-6.7.9-Q16

with directory where you actually installed Image Magick



来源:https://stackoverflow.com/questions/16996718/imagemagick-install-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!