Page 1 of 1

Identify returns BLANK info - 2008 R2 COM+

Posted: 2013-08-27T18:05:10-07:00
by tphelps19
I'm running ImageMagick from a vbscript on 2008 R2 and just calling the COM+ object. I can use the Identify function with the "-format" option to return height and width of an image just fine. My problem is when I'm trying to get basic info on an image by just using the Identify function, it returns blank data. Here is my code:

Set img = CreateObject("ImageMagickObject.MagickImage")
strInfo = img.Identify ("C:\image1.jpg")

msgbox strInfo


I get no errors but it returns blank (nothing). What am I doing wrong? I've tried using img.Identify ("-identify", "C:\image1.jpg") and that doesn't work either. It works just fine if I execute identify.exe from the command prompt with "identify.exe C:\image1.jpg". So I'm at a loss as to why the COM+ object doesn't return any info with Identify?

Re: Identify returns BLANK info - 2008 R2 COM+

Posted: 2013-08-27T18:35:01-07:00
by snibgo
Getting Started - a newbie's take, and the rest of that forum, may be helpful.

Re: Identify returns BLANK info - 2008 R2 COM+

Posted: 2013-08-27T19:07:32-07:00
by tphelps19
Making a little progress. Turns out that the documentation that says the COM object accepts exactly the same as the command line utilty not even close to correct. This is what I had to do just to return the file type:

strInfo = img.Identify("-format", "%m", "C:\image1.jpg")

NOT AT ALL what documentation says. If I go to command prompt I can type in just: "identify.exe C:\image1.jpg" and it will spit out all the basic info. I can't even find a place on documentation that shows all the variables and what they do. I picked up that %m works for file type but where is that documented? Where is a list of all the others?? I'm looking at this page and don't see any list in reference to that: http://www.imagemagick.org/Usage/basics/#identify

Re: Identify returns BLANK info - 2008 R2 COM+

Posted: 2013-08-27T19:33:57-07:00
by snibgo
The post I linked to links to the escapes.