user2101411
user2101411

Reputation: 1202

Imagick not able to load a module

I'm trying to use Imagick to edit images but I am getting an exception as follows:

 ImagickException: UnableToLoadModule `C:\xampp\apache\bin\IM_MOD_RL_JPEG_.dll': The specified module could not be found.
 @ error/module.c/OpenModule/1300 in C:\xampp\htdocs\public\test.php:4
Stack trace:
#0 C:\xampp\htdocs\public\test.php(4): Imagick->__construct('C:\\xampp\\htdocs...')
#1 {main}

I've looked at the phpinfo page and I can't find that jpeg images are supported, even though the .dll is in the apache\bin folder. (here is a screenshot of my phpinfo information returned regarding imagick https://i.sstatic.net/tenQM.jpg). Also, the contents of apache/bin - https://i.sstatic.net/905nj.jpg, which clearly show that IM_MOD_RL_jpeg.dll is in the directory. Is there something I am missing, as clearly jpeg files are not supported in this installation that I did of Imagick but I think something I did was incorrect as I can't imagine jpeg images would not be supported.

Any help would be appreciated.

Thanks!

Update - I fixed it, I had the wrong build installed.

Upvotes: 2

Views: 2504

Answers (2)

Ferenc Kovács
Ferenc Kovács

Reputation: 21

I tried to install imagemagic to xampp on win10 many times. The only working solution what helped is:

  • download both of the extension and imagemagic binaries zip according your php version,ts and architect from https://mlocati.github.io/articles/php-windows-imagick.html
  • copy php_imagick.dll to "xampp\php\ext\"
  • copy all dll except ImageMagickObject.dll from "ImageMagick-6.9.3-7-vc11-x86.zip\bin\" to "xampp\apache\bin\"
  • no need to install imagemagic application or set path

Upvotes: 2

mikep
mikep

Reputation: 3905

According to http://www.imagemagick.org/discourse-server/viewtopic.php?t=31170 , the solution is to set MAGICK_HOME to the folder hoding ImageMagick and IM_MOD_RL_JPEG_.dll .

Upvotes: 3

Related Questions