Identify returns BLANK info - 2008 R2 COM+

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
tphelps19
Posts: 2
Joined: 2013-08-27T16:53:00-07:00
Authentication code: 6789

Identify returns BLANK info - 2008 R2 COM+

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify returns BLANK info - 2008 R2 COM+

Post by snibgo »

Getting Started - a newbie's take, and the rest of that forum, may be helpful.
snibgo's IM pages: im.snibgo.com
tphelps19
Posts: 2
Joined: 2013-08-27T16:53:00-07:00
Authentication code: 6789

Re: Identify returns BLANK info - 2008 R2 COM+

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Identify returns BLANK info - 2008 R2 COM+

Post by snibgo »

The post I linked to links to the escapes.
snibgo's IM pages: im.snibgo.com
Post Reply