Jan Sverre
Jan Sverre

Reputation: 4723

Imagick in PHP unable to open image

I am trying to make a simple gradient in Imagick.

$im = new Imagick;

$im->newPseudoImage(279, 99, 'gradient:rgba(251, 215, 176, 1)-rgba(231, 195, 156, 1)');

I am getting this error message

unable to open image `rgba(251, 215, 176, 1)-rgba(231, 195, 156, 1)': No such file or directory @ error/blob.c/OpenBlob/2642

I am running PHP 5.6.11 on IIS 7.5 in Windows 10. Did install Imagick from http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/

Upvotes: 1

Views: 1074

Answers (1)

Jan Sverre
Jan Sverre

Reputation: 4723

I figured it out! Imagick has the most complicated installation process I have ever seen.

I went here and downloaded ImageMagick-6.8.8-10-Q16-x86-dll.exe. I installed it to my computer.

Then I went to the installation folder and did two things:

  1. I copied all .dll - files from the root folder of the installation into the root folder of my php installation
  2. I went into #ROOT_OF_IMAGICK_INSTALLATION#/modules/coders/ and copied all files from there into the root folder of my php installation. One of these modules was "IM_MOD_RL_gradient_.dll"

And then, it works for me. Hopefully someone else will be helped by this solution.

Upvotes: 1

Related Questions