Basic Drawing in VBA

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
get_
Posts: 2
Joined: 2012-08-28T08:40:21-07:00
Authentication code: 67789

Basic Drawing in VBA

Post by get_ »

Hi all,

I am trying to create a basic shape eg a circle, and then add this to an image. (a place for me to add text like "15% off!")

I see example lilke this all tehtime - but i have no idea how to execute this.
convert -size 70x70 canvas:none -fill red -draw 'circle 35,35 10,30' red-circle.png
-draw 'circle 50,30 50,55' circle_circle.gif

i can resize images using this.

Code: Select all

Sub resize()
 Set I = CreateObject("ImageMagickObject.MagickImage.1")
Open "C:\GT\1.jpg" For Binary Access Read Lock Write As #1
Text1 = I.Convert("convert logo:", "C:\GT\1.jpg", "-resize", "25x25!", "C:\GT\2.jpg")
Close #1
End Sub
But i can;t seem to get this command translation to work... i have tried many
convert -size 70x70 canvas:none -fill red -draw 'circle 35,35 10,30' red-circle.png
-draw 'circle 50,30 50,55' circle_circle.gif

Code: Select all

Sub create_Circle()
 Set I = CreateObject("ImageMagickObject.MagickImage.1")
Open "C:\GT\circle.gif" For Binary Access Read Lock Write As #1
Text1 = I.Convert("convert:", "-size", "70x70", "canvas:none", "-fill", _
 "Red", "-Draw", "'circle", "50,30", "55,55'", "C:\GT\circle.gif")
Close #1
End Sub

Can any one show me the correct way to do this? i have tried many combinations...
get_
Posts: 2
Joined: 2012-08-28T08:40:21-07:00
Authentication code: 67789

Re: Basic Drawing in VBA

Post by get_ »

what i'm trying to create is a photo pf a hotel with a round dot placed on the image where i can write some text...
Post Reply