friends,

I am attempting to use imagemagick via vbs.

I have installed the newest version and checked -All- the boxes at install.
( except assoc file type. gif etc )


I seem to get an error when running a vbs.
An application has made an attempt to load the C runtime library incorrectly.

i have even tried the supplied vbs.

this is simpleTest.vbs ----

Option Explicit

On Error Resume Next
Const ERROR_SUCCESS = 0

Dim img
Dim info
Dim msgs
Dim elem
Dim sMsgs

'
' This is the simplest sample I could come up with. It creates
' the ImageMagick COM object and then sends a copy of the IM
' logo out to a JPEG image files on disk.
'
Set img = CreateObject("ImageMagickObject.MagickImage.1")
'
' The methods for the IM COM object are identical to utility
' command line utilities. You have convert, composite, identify,
' mogrify, and montage. We did not bother with animate, and
' display since they have no purpose in this context.
'
' The argument list is exactly the same as the utility programs
' as a list of strings. In fact you should just be able to
' copy and past - do simple editing and it will work. See the
' other samples for more elaborate command sequences and the
' documentation for the utility programs for more details.
'
msgs = img.Convert("logo:","-format","%m,%h,%w","info:")
'
' By default - the string returned is the height, width, and the
' type of the image that was output. You can control this using
' the -format "xxxxxx" command as documented by identify.
'
If Err.Number <> ERROR_SUCCESS Then ShowError: WScript.Quit
MsgBox "info: " & msgs
Set img=Nothing
WScript.Quit(0)

Sub ShowError
  sMsgs = ""
  If BasicError(Err.Number) > 5000 Then
    sMsgs = " ImageMagickObject" & vbCrLf
  End If
  WScript.Echo Err.Number & ": " & Err.Description & vbCrLf & sMsgs
End Sub

Function BasicError(e)
  BasicError = e And &HFFFF&
End Function
-------------------------------------------------------------------

 all fail with this complaint

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: C:\WINDOWS\System32\WScript.exe

R6034

An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.


---------------------------
OK
---------------------------
=============================================

so  - what the huh? , I doubt that the code in the VBS is actually at
fault...
What am I missing?

i have uninstalled and reinstalled newest vers ::  ImageMagick-6.4.9-Q16

Thanks

j







_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to