VBA ImageMagickObject mogrify problem

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
hjt

VBA ImageMagickObject mogrify problem

Post by hjt »

Hello,

i have a problem using the mogrify method of the ImageMagickObject in VBA.
In the following example, the convert command works fine. The mogrify command throws the
runtime error 'morgify (why morgify???) 410: unrecognized option "-resize 400x300" '

Code: Select all

Dim img As New ImageMagickObject.MagickImage

Sub test()
    Dim SourceFile As String
    Dim DestFile As String
    Dim msg
    SourceFile = "d:\Eigene Dateien\Eigene Bilder\wallpapers\test.bmp"
    DestFile = "d:\Eigene Dateien\Eigene Bilder\wallpapers\test.jpg"
    
    msg = img.Convert(SourceFile, DestFile)
    Debug.Print msg
    msg = img.Mogrify("-resize 400x300", DestFile)

End Sub
Please tell me - where's my error? Wrong syntax ? I haven't found any documentation/examples for using the mogrify method of the COM object in VBA.

I am running the ImageMagick-6.3.3-1-Q16-windows-dll.exe package on Windows XP SP2.

Thanks
hjt
hjt

Re: VBA ImageMagickObject mogrify problem

Post by hjt »

Ok, i found it:

The syntax is

Code: Select all

img.Mogrify("-resize", "560x450", filename)
Post Reply