using with VB.net 2013

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
syoung
Posts: 1
Joined: 2016-03-16T11:13:50-07:00
Authentication code: 1151

using with VB.net 2013

Post by syoung »

Is there a list of instructions to use this in a VB.net Application. Right now I am using it as a shell and the DOS screen keeps popping up and it is very slow.
markt
Posts: 8
Joined: 2016-02-15T17:08:32-07:00
Authentication code: 1151

Re: using with VB.net 2013

Post by markt »

I just tried this simple example based on what I had in VBA using Visual Studio Community 2013, to build an x64 target, on windows 8.1 64 bit.

You need to use the 64 bit version of ImageMagick if you are creating a 64 bit application.

Only late binding seems to work, so objIM is defined as object in the example.

64 bit version is slightly faster than 32, but not sure the COM object is much faster than command line.

Code: Select all

Module Module1

    Sub main()

        Dim objIM As Object

        objIM = CreateObject(("ImageMagickObject.MagickImage.1"))

        objIM.Convert("logo:", "logo.jpg")
    End Sub
End Module
Make sure you installed the ImageMagickObject when you installed ImageMagick.

Register the ImageMagickObject.dll using regsvr32.exe from windows\system32.

Make sure the system Path environment variable includes:-
C:\Program Files\ImageMagick-6.9.3-Q16;

Also had to change two other environment variables that had been set by a recently installed utility:-
MAGICK_CODER_MODULE_PATH
C:\Program Files\ImageMagick-6.9.3-Q16\modules\coders

MAGICK_FILTER_MODULE_PATH
C:\Program Files\ImageMagick-6.9.3-Q16\modules\filters
Post Reply