Page 1 of 1

compose src in qtp

Posted: 2013-02-07T05:45:29-07:00
by adelina
hello,
I am using imagemagick command: " compare imgcopy.tif imgorig.tif -compose src -highlight-color blue imgdif.tif" in qtp like this:
" set img = CreateObject("ImageMagickObject.MagickImage.1")
img.Compare Path & img1.tif, path & img2.tif ,"-compose src -highlight-color blue & path & imgdif.tif"

and it doesn't works...

if i use : set img = CreateObject("ImageMagickObject.MagickImage.1")
img.Compare Path & img1.tif, path & img2.tif ,path & imgdif.tif
without "-compose src -highlight-color" the command works just fine....

Re: compose src in qtp

Posted: 2013-02-07T07:13:29-07:00
by snibgo
I know nothing about qtp, but "-compose src -highlight-color blue & path & imgdif.tif" isn't valid ImageMagick syntax.

Perhaps it should be: "-compose src -highlight-color blue", path & imgdif.tif.

Re: compose src in qtp

Posted: 2013-08-05T23:22:44-07:00
by iyeranki
can u pls provide the exact syntax in QTP? I am trying to execute the compare command but it gives me a "General Run Error"

Re: compose src in qtp

Posted: 2013-08-06T11:01:53-07:00
by fmw42
compare imgcopy.tif imgorig.tif -compose src -highlight-color blue imgdif.tif
This command should work fine. See http://www.imagemagick.org/Usage/compare/#methods

Does it work on the test images on that page? They work for me on IM 6.8.6.7 Q16.

Can you test in command line first before trying to use some other API?

What version of IM are you using and what platform?

Re: compose src in qtp

Posted: 2013-08-06T16:42:30-07:00
by fmw42
" set img = CreateObject("ImageMagickObject.MagickImage.1")
img.Compare Path & img1.tif, path & img2.tif ,"-compose src -highlight-color blue & path & imgdif.tif"
I do not know anything about qtp, but it looks to me like you have a problem with quoting.

Why do you have & path & imgdif.tif in the same quotes as -compose src -highlight-color blue?

Do you have nested quotes? If so that may be an issue that it is breaking up the command wrong.