Page 1 of 1

Unable to load module

Posted: 2017-01-06T15:24:06-07:00
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?

Re: Unable to load module

Posted: 2017-01-06T16:28:50-07:00
by dlemstra
Did you install the C++ Redistributable?

Re: Unable to load module

Posted: 2017-01-17T10:20:41-07:00
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)

Re: Unable to load module

Posted: 2017-01-17T10:47:30-07:00
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.

Re: Unable to load module

Posted: 2017-08-07T16:06:53-07:00
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