Page 1 of 1

How to extract the compare parametr (1.#inf) for further use

Posted: 2011-11-09T13:10:33-07:00
by antananarivu
Hi guys, i've been looking for the compare program for a long time and found image magick - thats great

and this one works from cmd it just the thig i was looking for

I am using Imagemagick's Compare.exe.

My problem is how to handle the "1.#INF" and output it to the file or somewhere, to use it further with powershell script

can somebody help me please

Re: How to extract the compare parametr (1.#inf) for further

Posted: 2011-11-09T15:30:07-07:00
by fmw42
I am not a windows user, but the compare results go to std error, so in unix one would do:


string=`compare -metric rmse rose: rose: null: 2>&1`
echo $string
0 (0)

I do not know how to do this in windows, but you may get some ideas from http://www.imagemagick.org/Usage/windows/

Re: How to extract the compare parametr (1.#inf) for further

Posted: 2011-11-09T16:15:23-07:00
by anthony
I am not certain what you mean by 1.#inf
The 'inf' looks like a floating-point infinite value, but I have never seen that output from compare.

Re: How to extract the compare parametr (1.#inf) for further

Posted: 2011-11-10T04:49:15-07:00
by antananarivu
anthony wrote:I am not certain what you mean by 1.#inf
The 'inf' looks like a floating-point infinite value, but I have never seen that output from compare.

if i compare two identical images, i get the cmd line 1.#inf


so it looks like

"ImageMagick\compare.exe" -metric PSNR "Screenshots\first.jpg" "Screenshots\second.jpg" "Screenshots\difference.png"
1.#inf

and it creates me the file difference.png which shows the difference (if it is present)

but i need this 1.#inf or something to use like the condition that the images are identical

Re: How to extract the compare parametr (1.#inf) for further

Posted: 2011-11-10T05:13:16-07:00
by antananarivu
fmw42 wrote:I am not a windows user, but the compare results go to std error, so in unix one would do:


string=`compare -metric rmse rose: rose: null: 2>&1`
echo $string
0 (0)

I do not know how to do this in windows, but you may get some ideas from http://www.imagemagick.org/Usage/windows/

thats great i managed with it =))) it looks like

compare.cmd >log.log 2>&1

thanks to all =)))