Code: Select all
Option Explicit
Dim oMI
Dim sID
set oMI = createObject("ImageMagickObject.MagickImage")
sID = oMI.Identify ("-ping", WScript.Arguments(0))
WScript.Echo "Output:"
WScript.Echo "_" & sID & "_"
Code: Select all
rose:=>ROSE ROSE 70x46 70x46+0+0 DirectClass 8-bit 9.44531kb
Output:
__
If you run this with wscript instead, the output is not displayed at all.
I'm leaning toward going back to the MagickImage object instead of calling out to the static exes, but this is a bit of a road block.
I just glanced at the code in ATL7/ImageMagickObject.cpp and noticed something different between the two. The declarations are the same, but the implementations are slightly different in that they return different types. Not sure if that's an issue or not.
Code: Select all
HRESULT Convert(SAFEARRAY **pArrayVar, VARIANT *pVar);
HRESULT Identify(SAFEARRAY **pArrayVar, VARIANT *pVar);
STDMETHODIMP MagickImage::Convert(SAFEARRAY **pArrayVar, VARIANT *pVar)
{
HRESULT hr;
...
return hr;
}
HRESULT MagickImage::Identify(SAFEARRAY **pArrayVar, VARIANT *pVar)
{
HRESULT hr;
...
return hr;
}
Gary