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?
Identify returns BLANK info - 2008 R2 COM+
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Identify returns BLANK info - 2008 R2 COM+
Getting Started - a newbie's take, and the rest of that forum, may be helpful.
snibgo's IM pages: im.snibgo.com
Re: Identify returns BLANK info - 2008 R2 COM+
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
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
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Identify returns BLANK info - 2008 R2 COM+
The post I linked to links to the escapes.
snibgo's IM pages: im.snibgo.com