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....
compose src in qtp
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: compose src in qtp
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.
Perhaps it should be: "-compose src -highlight-color blue", path & imgdif.tif.
snibgo's IM pages: im.snibgo.com
Re: compose src in qtp
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"
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: compose src in qtp
This command should work fine. See http://www.imagemagick.org/Usage/compare/#methodscompare imgcopy.tif imgorig.tif -compose src -highlight-color blue imgdif.tif
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?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: compose src in qtp
I do not know anything about qtp, but it looks to me like you have a problem with quoting." set img = CreateObject("ImageMagickObject.MagickImage.1")
img.Compare Path & img1.tif, path & img2.tif ,"-compose src -highlight-color blue & path & imgdif.tif"
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.