Problems with ParamArray and convert

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
jmunin

Re: Problems with ParamArray and convert

Post by jmunin »

Hello,

I have the same problem. I tried too with:
...
dim parArray() as string
redim parArray(5)
...

or

...
dim parArray() as string
dim str as string
str="-background,lightblue,-font,Arial,label:abc,e:\tmp\font.gif"
parArray=split(str, ",")
...

but i get the same error.... Please, any help?

Thanks
jmunin

Re: Problems with ParamArray and convert

Post by jmunin »

more details:

Dim arrayMagick As Variant
dim imageMagick As ImageMagickObject.MagickImage

ReDim arrayMagick(13)
arrayMagick(0) = "c:\in.bmp"
arrayMagick(1) = "-debug"
arrayMagick(2) = "-font"
arrayMagick(3) = "Arial"
arrayMagick(4) = "-pointsize"
arrayMagick(5) = "32"
arrayMagick(6) = "-fill"
arrayMagick(7) = "black"
arrayMagick(8) = "-gravity"
arrayMagick(9) = "NorthWest"
arrayMagick(10) = "-annotate"
arrayMagick(11) = "0x0+0+0"
arrayMagick(12) = "hola"
arrayMagick(13) = "c:\out.bmp"

Set imageMagick = New MagickImage
Call imageMagick.Convert(arrayMagick) ' vb crashs
' but
call imageMagick.Convert("c:\in.bmp", "-font", "Arial", "-pointsize", "32", "-fill", "black", "-gravity", "NorthWest", "-annotate", "0x0+0+0", "hola", "c:\out.bmp") ' work ok

i need build array of strings in a dynamic manner. i use ImageMagick-6.4.2-10-Q8-windows-static

any help is welcome.... Thanks
Post Reply