Unable to load module

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
bgoff@xanterra.com
Posts: 3
Joined: 2017-01-06T15:15:36-07:00
Authentication code: 1151

Unable to load module

Post by bgoff@xanterra.com »

vbscript:

Code: Select all

set oIM = CreateObject("ImageMagickObject.MagickImage.1")
if isObject(oIM) then
	oIM.convert objPath & oFS.GetFileName(fname), "-resize", "100x72", objPath & "thumb_" & objID & "." & oFS.GetExtensionName(fname)
end if
Windows Script Host Error (on the oIM.convert line): "convert: 455: unable to load module 'C:\Program Files\ImageMagick-7.0.4-Q16\Modules\coders\IM_MOD_RL_JPEG_.dll': the specified module could not be found."

The pathname in the error message does exist, however if I run Dependency Walker against it, the following files are missing:
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
DCOMP.DLL
IESHIMS.DLL

I'm not very savvy about dll registration, etc.; any suggestions how to resolve this?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Unable to load module

Post by dlemstra »

Did you install the C++ Redistributable?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
bgoff@xanterra.com
Posts: 3
Joined: 2017-01-06T15:15:36-07:00
Authentication code: 1151

Re: Unable to load module

Post by bgoff@xanterra.com »

I have Microsoft Visual C++ Redistributable versions 9.0.30729.4148 (x64), 11.0.60610 (x86 and x64), 11.0.61030 (x86 and x64), 12.0.21005 (x86 and x64), 12.0.30501 (x86 and x64) and 14.0.23506 (x86 and x64)
bgoff@xanterra.com
Posts: 3
Joined: 2017-01-06T15:15:36-07:00
Authentication code: 1151

Re: Unable to load module

Post by bgoff@xanterra.com »

Having a devil of a time getting convert to work in a VB script; the COM object doesn't load (see above) and trying to call convert.exe via Shell.Exec returns an error code of 1 without creating the output file. The same command in a cmd window works fine. Frustrating.
alfredopacino
Posts: 14
Joined: 2011-01-28T06:58:45-07:00
Authentication code: 8675308

Re: Unable to load module

Post by alfredopacino »

I've the same error

Code: Select all

Dim imageMagick
Set imageMagick = CreateObject("ImageMagickObject.MagickImage.1")

imageMagick.convert "C:/1infra.png", "-fuzz", "10%", "-trim", "-resize", "800x800>", "C:/1infra-sample.png"
I'm on win7 x64.
I see I've installed Microsoft Visual C++ Redistributable 2005,2008,2010,2012,2013,2015 (not sure why so many versions..)
I tried jpg and png both, none works

the command convert -list configure prints

Code: Select all



Path: [built-in]

Name           Value
-------------------------------------------------------------------------------
FEATURES       OpenMP
NAME           ImageMagick
QuantumDepth   16

Path: C:\Program Files\ImageMagick-7.0.6-Q16\configure.xml

Name           Value
-------------------------------------------------------------------------------
CC             vs10
COPYRIGHT      Copyright (C) 1999-2017 ImageMagick Studio LLC
DELEGATES      bzlib freetype jpeg jp2 lcms png raw tiff x11 xml wmf zlib
FEATURES       OpenMP
HOST           Windows
LIB_VERSION    0x706
LIB_VERSION_NUMBER 7,0,6,5
NAME           ImageMagick
RELEASE_DATE   2017-08-15
VERSION        7.0.6
WEBSITE        http://www.imagemagick.org
Post Reply