Page 1 of 1

swap issue

Posted: 2011-09-28T11:00:16-07:00
by emontezuma
Hi Anthony, in first place my english is so short I'm venezuelan and I'm living in Mexico.
In second place, excuse me a lot by email direct to you instead the forum, but I don't find the way to enter in the IM forum :-S.

I'm new in IM commands, I have a lot of year developing in VB and I'm marvel with IM, is wonderfull.
In this moment I'm developing a image manager software and IM is the best tool for my purpose.

The issue:
1) I installed the IM library correctly.
2) I want simply draw the word "test" whit a blur shadow.
3) If I run directly in the windows cmd shell, the sample run perfectly.
4) If I run the sample in VB the result is not the best.

5) This is the code in VB


...
Dim objImageMagick_01 As Object ' DEFINIMOS UN OBJECTO
Set objImageMagick_01 = CreateObject("ImageMagickObject.MagickImage.1") ' CREAMOS UN OBJECTO, SERA NUESTRO OBJETO IMAGEMAGICK

objImageMagick_01.Convert "-background", "none", "-fill", "white", "-font", "Arial", "-pointsize", "90", "label:test", " ( +clone -background red -shadow 200x3+0+0 ) +swap -background none -layers merge +repage", "c:\test.png"

Set objImageMagik_01 = Nothing

...

5.1) The generated image with VB application (see attached file test (vbdes).png).
As you can see, I can not put the first image over the second (swap), and allways the second image (shadow) is over the first (word) and I ca not get the shadow effect.

6) The image generated with the IM console (windows cmd) is the PERFECT RESULT (see attached file test (cmd).png)

7) My ask: is something wrong in the VB command? why is different the result in VB against the CMD result ?
I have tried everything without good results.
The only way is rewrite the first image ("test" word) again after the shadow. I mean, I need to do a new image overlaping the text after the clone command pharentesis :-(

Sorry, but I don't know how to post images :-(

Re: swap issue

Posted: 2011-09-28T12:28:21-07:00
by el_supremo
You might need to separate all the arguments into separate strings like this:

Code: Select all

objImageMagick_01.Convert "-background", "none", "-fill", "white", "-font", "Arial", "-pointsize", "90", "label:test", "(","+clone","-background","red","-shadow","200x3+0+0",")","+swap","-background","none","-layers","merge","+repage", "c:\test.png"
Pete