Page 1 of 1

ImageMagickObject Identify not returning output correctly

Posted: 2010-01-14T14:55:37-07:00
by spieler
See viewtopic.php?f=8&t=15329 for more details.

I created a file called test.js

Code: Select all

var im = WScript.CreateObject("ImageMagickObject.MagickImage.1");
var msgs = im.Identify("rose:");
WScript.Echo("\"" + msgs + "\"");
var msgs = im.Identify("-format", "%m", "rose:");
WScript.Echo("\"" + msgs + "\"");
and then called it with
cscript //nologo test.js

It produced

rose:=>ROSE ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb

What this shows is that if you do not use a specific "-format" parameter, instead of returning as the output of the function, it actually writes to standard out.