ImageMagickObject Identify not returning output correctly
Posted: 2010-01-14T14:55:37-07:00
See viewtopic.php?f=8&t=15329 for more details.
I created a file called test.js
and then called it with
cscript //nologo test.js
It produced
rose:=>ROSE ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
"undefined"
"ROSE"
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.
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 + "\"");
//SimpleTestIdentify.vbs
var msgs = im.Identify("-format", "%m", "rose:");
WScript.Echo("\"" + msgs + "\"");
cscript //nologo test.js
It produced
rose:=>ROSE ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
"undefined"
"ROSE"
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.