Page 1 of 1

Image Magick with Lazarus not working after update.

Posted: 2018-05-26T07:22:38-07:00
by Steve_
Hi, I've updated Lazarus and ImageMagic after 3 years, and initially I got the runtime error:

"... CORE_RL_magick_.dll is missing from your computer."

That dll is now called CORE_RL_MagickCore_.dll.

I changed the following references in ImageMagic.pas:

CORE_RL_magick_.dll to C:\Program Files\ImageMagick-7.0.7-Q16\CORE_RL_MagickCore_.dll
CORE_RL_wand_.dll to C:\Program Files\ImageMagick-7.0.7-Q16\CORE_RL_MagickWand_.dll

This made no difference and eventually I found I had to put all 25 ImageMagick dlls in the same folder as my final exe file.

Now the program executes but there are colours missing in the images, and it hits an access violation when I load a new image.

Having to put those dlls in the exe file folder is obviously not right. In the previous installation I didn't need to pull in any dlls or make any changes.

Thanks for any help,

Steve.

Re: Image Magick with Lazarus not working after update.

Posted: 2018-05-26T07:49:45-07:00
by snibgo
Has Lazarus been updated for ImageMagick v7? I guess your previous installation was v6. If so, try de-installing IM v7 and install the current v6.

Re: Image Magick with Lazarus not working after update.

Posted: 2018-05-26T13:40:05-07:00
by Steve_
Thanks snibgo,

I've replaced IM v7 with v6.9.9. The images are rendering properly now, but I still have to put those 25 IM dlls in the same folder as my project exe file. That can't be right surely?

Re: Image Magick with Lazarus not working after update.

Posted: 2018-05-26T13:58:56-07:00
by snibgo
I don't know how Pascal or Lazarus interact with IM.

When I write a C or CPP program that calls IM functions, I need to move the compiled binary (.exe) file to the IM installation, or it complains it can't find DLLs. I expect symbolic links could be used instead of physically copying files. This is with Windows 8.1 and Cygwin. I don't know how other environments work.

Re: Image Magick with Lazarus not working after update.

Posted: 2018-05-27T06:46:26-07:00
by Steve_
Well my main concern was about having to put all those dlls into the distribution. It's strange that in the previous version they were somehow incorporated into the project exe file, although I hadn't tested the exe away from the project folder.

Thanks for your help snibgo!