Page 1 of 1

imagemagick compare used in vbscript

Posted: 2012-10-17T01:16:05-07:00
by adelina
hi,
i want to use this comand : compare -metric RMSE file.tif file2.tif diff.tif 2> out.txt in vbs and i used this code:
set img= CreateObject("ImageMagickObject.MagickImage.1")
img.Compare "-metric", "RMSE", location & File1 & ."tif", location & File2 & ."tif",location & File1 & ."_" & File2 & ".tif", ">> out.txt"
But it doesn't work.

thanks

Re: imagemagick compare used in vbscript

Posted: 2012-10-17T13:15:54-07:00
by whugemann
I wouldn't do it the "object way", but rather call Compare directly, analoguously to the way I call Identify in http://www.imagemagick.org/Usage/windows/#vb, first example. You can then either redirect the output to a file, as you are trying to do, or read it directly from stdout, as demonstrated in the above mentioned code example.