compose src in qtp

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
adelina
Posts: 18
Joined: 2011-08-03T04:01:45-07:00
Authentication code: 8675308

compose src in qtp

Post 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....
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: compose src in qtp

Post 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.
snibgo's IM pages: im.snibgo.com
iyeranki
Posts: 1
Joined: 2013-08-05T23:13:09-07:00
Authentication code: 6789

Re: compose src in qtp

Post 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"
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: compose src in qtp

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: compose src in qtp

Post 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.
Post Reply