ImageMagickObject Identify not returning output correctly

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
spieler
Posts: 47
Joined: 2004-10-08T09:03:16-07:00
Location: Iowa

ImageMagickObject Identify not returning output correctly

Post by spieler » 2010-01-14T14:55:37-07:00

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 + "\"");
//SimpleTestIdentify.vbs
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
"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.

Post Reply