unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
eprocessing
Posts: 2
Joined: 2017-09-20T18:49:46-07:00
Authentication code: 1151

unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by eprocessing » 2017-09-20T19:13:59-07:00

After upgrading from ImageMagick version 7.0.6-9 Q16 to version 7.0.7-1 Q16, I received the following errors:

20170920 204421 00000 [42364]:103 imageSize: Error
20170920 204421 00000 [42364]:104 identify: unable to load module 'C:\Program Files\ImageMagick-7.0.7-Q16\modules\coders\IM_MOD_RL_PNG_.dll': The specified module could not be found.
20170920 204421 00000 [42364]:105 @ error/module.c/OpenModule/1270.
20170920 204421 00000 [42364]:106 identify: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/509.
20170920 204421 0215928 [42364]:107 storeImage : Invalid image or unusable size

This also happens with version 7.0.7-3 Q16. I reverted back to version 7.0.6-9 Q16 and the errors stopped. What could have changed in ImageMagick to cause this?

User avatar
dlemstra
Posts: 1475
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by dlemstra » 2017-09-20T22:40:23-07:00

Did you install the VS2013 redistributable?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

eprocessing
Posts: 2
Joined: 2017-09-20T18:49:46-07:00
Authentication code: 1151

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by eprocessing » 2017-09-21T06:09:00-07:00

Yes, the x64 version is installed.

greg.wacker
Posts: 1
Joined: 2017-12-23T03:04:10-07:00
Authentication code: 1152

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by greg.wacker » 2017-12-23T03:12:49-07:00

The issue for me is it's seems to use relative paths to the modules now or something, but that didn't use to be the case...

C:\> "C:\Program Files\ImageMagick-7.0.7-Q16\identify.exe" "myimage.jpg"
Error can't find modules

C:\Program Files\ImageMagick-7.0.7-Q16> "identify.exe" "myimage.jpg"
Works

I wish this would get fixed because I need to call this from another program where changing directories isn't an option.

User avatar
dlemstra
Posts: 1475
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by dlemstra » 2017-12-24T06:36:55-07:00

It looks like you did not select "Add application directory to your system path" during the installation.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

snibgo
Posts: 10488
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by snibgo » 2017-12-24T06:43:52-07:00

dlemstra wrote:It looks like you did not select "Add application directory to your system path" during the installation.
That has always been an option. Is it now a requirement? In Windows versions of IM I use (mostly 6.9.5-3 and 7.0.3-5) I can run them fine by giving the full path to convert.exe or magick.exe, without them being in the system path.
snibgo's IM pages: im.snibgo.com

User avatar
dlemstra
Posts: 1475
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by dlemstra » 2017-12-24T07:10:22-07:00

You are right snibgo. My bad.

I just did a quick check and I could run the command without any issues when the file exists but I am getting the same error when I run the command on a file that is missing. I tested this on a Virtual Machine with `ImageMagick-7.0.7-16-Q16-x64-dll` (from appveyor build) installed. I just did a quick test on my local machine but I cannot reproduce it there. Will need to do some more testing to figure out why this weird error is given.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

User avatar
dlemstra
Posts: 1475
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: unable to load module IM_MOD_RL_PNG_.dll in version 7.0.7

Post by dlemstra » 2017-12-24T09:49:41-07:00

It seems that Windows no longer (or it never did?) loads referenced libraries from the directory of the executable. The `mod_png` dll is located in the modules/coders directory but it needs the `png` dll that is located in the same folder as the executable. I just pushed a patch with a workaround for this to our git repository.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

Post Reply