Use ImageMagick without install (in VBA)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
anglerdk
Posts: 3
Joined: 2011-02-23T07:06:27-07:00
Authentication code: 8675308

Use ImageMagick without install (in VBA)

Post by anglerdk »

Hi

I have made a VBA script

Code: Select all

Function ResizeImg(ByVal From As String, ByVal to As String, ByVal Q As Integer, ByVal Res As String)

Dim img As Object

Set img = CreateObject("ImageMagickObject.MagickImage.1") 


msg =  img.Convert(From,to) 
msg = img.Mogrify("-resize", Res, "-quality", Q, to)
end function
Works like a dream on my machine, but when trying it on a friends machine - it gave "run-time error 429 , ActiveX cannot create object
(translated from Danish, so the error can be something else in English).
I have made the reference to the ImageMagickObject.dll and tried regsvr32 /c /s "C:\ImageMagickObject\ImageMagickObject.dll" but no luck.

I am using

Windows XP Pro SP3



my question is

is it possible to use ImageMagick without installing it ????? - since it should be used on computers without admin rights


Thanx for your time and help.
Tachoknight
Posts: 8
Joined: 2007-03-03T13:30:14-07:00

Re: Use ImageMagick without install (in VBA)

Post by Tachoknight »

At the very least the library has to be registered as a COM object so that it can be invoked by VBA. You do this with "regsvr32" at the command prompt like:

Code: Select all

c:\temp>regsvr32 foo.dll
where foo.dll is the IM COM library (don't know what it is offhand, sorry)
anglerdk
Posts: 3
Joined: 2011-02-23T07:06:27-07:00
Authentication code: 8675308

Re: Use ImageMagick without install (in VBA)

Post by anglerdk »

Tachoknight wrote:At the very least the library has to be registered as a COM object so that it can be invoked by VBA. You do this with "regsvr32" at the command prompt like:

Code: Select all

c:\temp>regsvr32 foo.dll
where foo.dll is the IM COM library (don't know what it is offhand, sorry)

tried regsvr32 /c /s "C:\ImageMagickObject\ImageMagickObject.dll and regsvr32 "C:\ImageMagickObject\ImageMagickObject.dll allready

however I get an error: LoadLibrary("ImageMagickObject.dll")failed - The Specified module could not be founded :(
Tachoknight
Posts: 8
Joined: 2007-03-03T13:30:14-07:00

Re: Use ImageMagick without install (in VBA)

Post by Tachoknight »

Is vcomp100.dll in the same directory as ImageMagickObject.dll? I checked ImageMagickObject.dll and there's a dependency on that other library, so put vcomp100.dll in the same place and try registering ImageMagickObject.dll again.
anglerdk
Posts: 3
Joined: 2011-02-23T07:06:27-07:00
Authentication code: 8675308

Re: Use ImageMagick without install (in VBA)

Post by anglerdk »

tried this also (with the vcomp100.dll in the same folder) - got this:


Load library("imageMagickObject.dll") failed recursion to deep;stack overflow


But I cannot find a package where both the ImageMagickobject.dll and the other DLLs (eg vcomp100.dll)

:(
Tachoknight
Posts: 8
Joined: 2007-03-03T13:30:14-07:00

Re: Use ImageMagick without install (in VBA)

Post by Tachoknight »

Hmm....did you install the DLL version or the static version? I got it to work with the static version from http://www.imagemagick.org/script/binar ... hp#windows.
Post Reply