ImageMagick includes an optional COM component, ImageMagickObject. 

You need at least ImageMagick version 6.3.7-1 or later.
(http://imagemagick.org)

The COM componeent was broken in places on previous versions.

If you have a previous version, suggest you uninstall before
installing 6.3.7-1, as you have to make sure previous regestered com
object is unregistered.
 
You must choose to install the ImageMagickObject OLE control; it's
optional.

Then you need the pp com plugin
http://tech.groups.yahoo.com/group/power-pro/files/Plug-ins_and_add-ons/0_Interfaces

Model is in vbs files in the ImageMagickObject\Tests folder of
ImageMagick installation

But this works for me:

local img = com.create_object("ImageMagickObject.MagickImage.1")
s = img.identify("-format", "%[EXIF:FocalLength]", <pathToYourFile>))

img.convert(scriptfolder ++ ?"\old.jpg", scriptfolder ++ ?"\new.png")

The ImageMagickObject COM object packages the command line utilities
convert, composite, identify, mogrify, and montage.

I'm not entirely clear when you're supposed to use separate arguments
in call to COM methods like convert, composite, identify; my guess is
anything that would be a whitespace-delimited argument on the command
line becomes a coma-separated argument in called to the com object.

Not strictly releated: my one quibble with ImageMagick is that it's
quite a big install.  But there's MagickCMD.  Docs say:

"MagickCMD calls the COM object to get the job done. This small
tight combination replaces the entire usual binary distribution in
just a few megabytes."

which might be worth investigating further if size of install bothers.



Reply via email to