Page 1 of 1

VBA ImageMagickObject mogrify problem

Posted: 2007-03-12T15:15:14-07:00
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

Re: VBA ImageMagickObject mogrify problem

Posted: 2007-03-13T00:57:24-07:00
by hjt
Ok, i found it:

The syntax is

Code: Select all

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