swap issue

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
emontezuma
Posts: 19
Joined: 2011-09-28T10:17:45-07:00
Authentication code: 8675308

swap issue

Post 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 :-(
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: swap issue

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply