Struggling to Install the Type Library

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
fdorfman
Posts: 3
Joined: 2016-04-28T21:09:55-07:00
Authentication code: 1151

Struggling to Install the Type Library

Post by fdorfman »

First-time user here. I just installed from ImageMagick-6.9.3-8-Q16-x64-dll.exe onto a Windows 10 machine.

The install is okay as far as command-line usage.

Now I want to import the Type Library (ImageMagickObject.dll) into Delphi (v10 Seattle Update 1). I don't think my problem is Delphi-specific.

When I go to Import Component, the list of Registered Type Libraries (which is quite extensive) doesn't list IM.

If I go to Add one, upon selecting ImageMagickObject.dll, I get an Error loading type library/DLL (80029C4A).

During installation, I selected:
-Install development headers and libraries for C and C++
-Install ImageMagickObject OLE Control for VBScript, Visual Basic and WSH

From the research I've done/Additional notes:

*http://imagemagick.org/script/api.php#pascal states PascalMagick a Pascal binding for the MagickWand API and also the low-level MagickCore library. It works with Free Pascal / Lazarus and Delphi.

*I've tried placing the DLL in C:\Windows; I've tried placing the ImageMagickObject.dll location on the Path.

*I did a fair amount of research, and still I know of no other way to see the list of all the Registered Type Libraries on my system than inside the Delphi IDE. If I knew of one, I'd certainly look there. Although, my strong sense is that it isn't there.

Does anyone have any thoughts or suggestions?

Ultimately I want to make IM calls from within a Delphi (OO Pascal) program.

I thought (still think?) the easiest way would be to import the IM Type Library. I've done the with Excel, Word, and some very specific third-party tools.

http://wiki.freepascal.org/PascalMagick makes it seem like this should (practically) be a breeze. And yet I'm stuck at the starting line.

Any help would be greatly appreciated.

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

Re: Struggling to Install the Type Library

Post by dlemstra »

Did you register the DLL after installation? I am not sure if the installer does that.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
fdorfman
Posts: 3
Joined: 2016-04-28T21:09:55-07:00
Authentication code: 1151

registering the DLL

Post by fdorfman »

Apparently the installation did NOT register it. I did.

After copying the IM dll file into C:\WINDOWS\system32, I executed:

Code: Select all

C:\WINDOWS\system32> regSvr32 ImageMagickObject.dll
and RegSvr32 responded with
DllRegisterServer in ImageMagickObject.dll succeeded
.

And that seemed promising.

BUT:

(1) I still don't see it in the Delphi list.
(2) The ImageMagickObject.dll file is NOT visible to me in Windows Explorer. I can see it in DOS and attrib returns "A".
(3) Now (after RegSvr32-ing it), if I go to Add it inside Delphi, I'm seeing the same 80029C4A error.

Arggh!

Any more thoughts?
fdorfman
Posts: 3
Joined: 2016-04-28T21:09:55-07:00
Authentication code: 1151

Got It.

Post by fdorfman »

From a response on the Embarcadero forums (https://forums.embarcadero.com/thread.j ... dID=210660)
Know nothing about that library, but Delphi is a 32-bit development
environment, it will not recognise 64-bit DLLs. So you need to install
a 32-bit version of ImageMagick to get the type library.

Delphi will generate 64-bit applications that will load 64-bit DLLs,
just be careful to match platforms.
That did it. Was it Delphi? Was it me?
Perhaps a lethal combination of 'em both.
Thanks.
Post Reply