Your eyes are just like Ruby

How to install RMagick on Windows.

Last Modified: 2017-03-28 (Tue) 12:37:55 (56d)

PURPOSE

The purpose of this page is to install RMagick on Windows. I have installed RMagick on Windows 7 and 10.

RMagick is a special in the following points.

  • Using a native code by C language.
  • Using ImageMagick. ImageMagick is a image editing software.

So, you will need to:

  • Setup DEVELOPMENT KIT.
  • Install ImageMagick.

PROCEDURE

1. Setup DEVELOPMENT KIT

You don't know details, please read here.

2. Install ImageMagick

  • You must be careful to choose a version.--RMagick 2.16.0 is not support ImageMagick 7, you must install ImageMagick 6.
    • To use the dll version, static version can not be used.
    • x86 / x64 will be selected in accordance with the Ruby environment.
    • Such as Q8 / Q16 is anything good.
  • To download the ImageMagick 6 will choose the old binary, which is put under the binaries directory of ImageMagick official site.
  • During the installation, the following selection in the screen of Select Addtional Tasks.
    • Add application directory to your system path
    • Install development headers and libraries for C and C++
screenshot_imagemagcik_install_opt.jpg

3. Set environment variables

When RMagick compilation, through the path to ImageMagick of include files and library files are visible.

  • CPATH = {ImageMagick install directory}/include
  • LIBRARY_PATH = {ImageMagick install directory}/lib

4. Install RMagick

Run the following command to install the RMagick.

gem install rmagick

This command will do the following:

  • Download RMagick
  • Compilation by DEVELOPMENT KIT
  • Install

If this does not work, please refer to the TROUBLESHOOTING.

5. Verify RMagick installation

This command will do the following:

gem list --local rmagick

Please make sure that it is output as follows.

*** LOCAL GEMS ***

rmagick (X.X.X)

Run the following command, let's make sure that RMagick runs.

ruby -e "require 'rmagick';puts Magick::colors"

It is okay if the output is a list of colors as follow.

name=AliceBlue, compliance=AllCompliance, color.red=61680.5, color.green=63736.5, color.blue=65535.5, color.opacity=0 
name=AntiqueWhite, compliance=AllCompliance, color.red=64250.5, color.green=60395.5, color.blue=55255.5, color.opacity=0 
name=AntiqueWhite1, compliance=X11Compliance, color.red=65535.5, color.green=61423.5, color.blue=56283.5, color.opacity=0 
name=AntiqueWhite2, compliance=X11Compliance, color.red=61166.5, color.green=57311.5, color.blue=52428.5, color.opacity=0 
...

TROUBLESHOOTING

Choose a ImageMagick version

When the bad version combination of ImageMagick an RMagick, you may not be able to install.

Please refer to the following.

RMagickImageMagickbitrltdatereporter
2.13.26.5.6-8-Q8-windows-dll32-
2.13.26.8.0-3-Q16-windows-x64-dll64×-
2.13.26.8.0-4-Q16-windows-dll32-
2.13.26.8.2-4-Q16-x86-dll.exe32×2013/02/02
2.13.26.8.2-4-Q16-x64-dll64×2013/02/02
2.13.26.8.5-8-Q8-x86-dll322013/05/30
2.13.26.8.5-8-Q16-x86-dll322013/05/30
2.13.26.8.5-9-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-0-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-1-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-5-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-6-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-7-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-8-Q16-x86-dll322014/01/20passerby
2.13.26.8.7-9-Q16-x86-dll32×2014/01/20passerby
2.13.26.8.7-10-Q16-x86-dll32×2014/01/20passerby
2.13.26.8.8-0-Q16-x86-dll32×2014/01/20passerby
2.13.46.9.0-4-Q16-x64-dll642015/01/27
2.16.07.0.3-1-Q16-x86-dll32×2016/09/29
2.16.06.9.5-10-Q8-x86-dll322016/09/29
2.16.06.9.6-3-Q16-HDRI-x64-dll642016/11/01
2.16.06.9.8-2-Q8-x64-dll642017/3/23ma

It is performance reporting welcome. Please write a comment.

Supplemental: About Q8/Q16, x86/x64, dll/static

First of all, The difference of Q8/Q16 is the number of internal representation bit of color in ImageMagick.

Q88 bits to each element of the RGB
Q1616 bits to each element of the RGB

If there is no special requirements, I think that may be the Q16.

Then the difference of x86/x64 is whether the 32-bit(x86) version or a 64-bit(x64) version. Please according to the Ruby environment that you are using.

Even in the OS is 64-bit, if you are using the 32-bit Ruby will use for the 32-bit ImageMagick.

Finally the difference of dll/static is whether you can use the functions of the ImageMagick from outside.

dllFunctions from the outside available
staticFunctions from the outside is not available

Always use the dll when using RMagick.

REFERENCE

RELATION

COMMENT

Comments here.

No comment. Comments/rmagick/howtoinstall/windows/en

Name: