imagemagick compare used in vbscript

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

imagemagick compare used in vbscript

Post 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
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: imagemagick compare used in vbscript

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