IM & VBA draw problem

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
PhilOfWalton
Posts: 1
Joined: 2011-03-23T16:57:24-07:00
Authentication code: 8675308
Contact:

IM & VBA draw problem

Post by PhilOfWalton »

I'm a complete newbie to Im, but gettin somewhere slowly
using
IMCmd = ProgPath
IMCmd = IMCmd & "convert "
'IMCmd = IMCmd & " -resize 100% "
IMCmd = IMCmd & " -background transparent "
IMCmd = IMCmd & " -gravity Southwest "
IMCmd = IMCmd & LabelFile ' The label part
IMCmd = IMCmd & " -draw "
' First 2 numbers are start position, second pair are width & height
IMCmd = IMCmd & Chr$(34) & "image SrcOver 0,0 " & BoatWidth & "," & BoatHeight & " "
IMCmd = IMCmd & BoatFileIn & Chr$(34) ' The boat part
IMCmd = IMCmd & " -trim +repage "

sGO = IMCmd & LabelFile
If ShellWait(sGO, vbHide) = 1 Then
Combine = IMFileOut
Else
MsgBox "Error ???"
End If

I have created a vertical transparent label approximately 3mm wide and 40mm long (LabelFile)
Also a transparent boat approximately 15mm square. In this case, reaging the BoatFileIn Png file BoatWidth & BoatHeight are both 83
I had assumed that the output image would be 15mm wide by 40 mm high, but it remains at 3mm x 40mm.
If, by rotating the angle of the label to say 45 degrees (so that the label is wider than the boat) all works perfectly.
Any ideas please
Thanks
Phil
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 43 guests