Image Stack syntax for COM in VB6
Posted: 2017-07-23T21:41:48-07:00
How do I get the parenthesis to work in VB6 with the COM dll?
This above works in DOS mode but not in the VB6 code below:convert c:\image2.png c:\image1.png -alpha off +repage ( -clone 0 -clone 1 -compose difference -composite -threshold 0 ) ( -clone 0 -clone 2 -compose multiply -composite ) -delete 0,1 +swap -alpha off -compose copy_opacity -composite -trim +repage c:\image12diff2a.png
End SubPrivate Sub LSButton_CreateDiff_Click()
Dim img As Object
Set img = CreateObject("ImageMagickObject.MagickImage.1")
img.Convert "c:\image2.png", "c:\image1.png", "-alpha", "off", "+repage", " ( ", "-clone", 0, "-clone", 1, "-compose", "difference", "-composite", "-threshold", 0, " ) ", " ( ", "-clone", 0, "-clone", 2, "-compose", "multiply", "-composite", " ) ", "-delete", "0,1", "+swap", "-alpha", "off", "-compose", "copy_opacity", "-composite", "-trim", "+repage", "c:\MyTemp\image12diff2a.png"
Set img = Nothing