Hoping someone can help me out.
This is essentially what I am doing. Using COM to do an image comparison between two images. The problem is myFuzz isn't returning anything when I use COM via VBS. Any idea why? When I do an img.Convert I get a string back, just not with img.Compare.
Set img = CreateObject("ImageMagickObject.MagickImage.1")
myFuzz = img.Compare("-metric","AE", "image1.png", "image2.png", "output.png")
MsgBox myFuzz
Any help would be much appreciated.
Note, the output.png is being created, so I know I am not getting an error.
Compare using COM from VBS returns a null value?
-
- Posts: 3
- Joined: 2011-12-22T14:27:21-07:00
- Authentication code: 8675308
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Compare using COM from VBS returns a null value?
text comparison results go to standard error. redirect you results to 2>&1. at least that is what I do in command line to put the results into a variable on my Mac/unix
-
- Posts: 3
- Joined: 2011-12-22T14:27:21-07:00
- Authentication code: 8675308
Re: Compare using COM from VBS returns a null value?
Thanks for the help..fmw42 wrote:text comparison results go to standard error. redirect you results to 2>&1. at least that is what I do in command line to put the results into a variable on my Mac/unix
That works great from a command line, but not from the COM component.
Using your suggestion, this is what I changed my script too:
Code: Select all
Set img = CreateObject("ImageMagickObject.MagickImage.1")
myFuzz = img.Compare("-metric","AE", "image1.png", "image2.png", "output.png", "2>&1")
MsgBox myFuzz
compare -metric AE image1.png image2.png output.png 2>&1
Looks like this guy is having the same problem:
viewtopic.php?f=1&t=17197&start=0