Page 1 of 1

Getting error in imagemagick

Posted: 2014-07-10T21:25:05-07:00
by manmanda
I am running a simple string to compare screenshot but i am getting an error Error : 0x80041771 Code : 80041771 Source : ImageMagickObject.MagickImage.1 I am still getting output but my script got halted due to above error . I am running below command in vbscript

Code: Select all

Option Explicit
Sub Compare_Image()

Dim img
Dim msgs
Set img = CreateObject("ImageMagickObject.MagickImage.1")
msgs = img.Composite("C:\Users\manasm\Desktop\test\osd4_1.bmp", 
"C:\Users\manasm\Desktop\test\osd4_sm.bmp", "-compose", "difference", 
"C:\Users\manasm\Desktop\test\DIFFBLOCK.bmp")
Set img=Nothing
WScript.Quit(0)
End Sub
Please give some clue

Re: Getting error in imagemagick

Posted: 2014-07-12T12:10:02-07:00
by Werty
manmanda wrote:I am running a simple string to compare screenshot but i am getting an error Error : 0x80041771 Code : 80041771 Source : ImageMagickObject.MagickImage.1 I am still getting output but my script got halted due to above error . I am running below command in vbscript

Code: Select all

Option Explicit
Sub Compare_Image()

Dim img
Dim msgs
Set img = CreateObject("ImageMagickObject.MagickImage.1")
msgs = img.Composite("C:\Users\manasm\Desktop\test\osd4_1.bmp", 
"C:\Users\manasm\Desktop\test\osd4_sm.bmp", "-compose", "difference", 
"C:\Users\manasm\Desktop\test\DIFFBLOCK.bmp")
Set img=Nothing
WScript.Quit(0)
End Sub
Please give some clue
Try using "-compose", "difference", "-composite"

also try using img.Convert instead of img.Composite

Re: Getting error in imagemagick

Posted: 2014-07-13T11:14:48-07:00
by manmanda
Tried still getting same error :(

Re: Getting error in imagemagick

Posted: 2014-07-13T18:55:53-07:00
by Werty
Are you sure the imagemagick object is properly registered ?

Try from a command prompt...

Code: Select all

Convert rose: rose.png
or in vb...

Code: Select all

Dim img
Dim msgs
Set img = CreateObject("ImageMagickObject.MagickImage.1")
msgs = img.Convert("rose:","C:\Users\manasm\Desktop\test\rose.png") 
Set img=Nothing
WScript.Quit(0)
If you still get error then something is wrong with your imagemagick installation.

Re: Getting error in imagemagick

Posted: 2014-07-17T04:04:38-07:00
by manmanda
In command prompt i am not getting any error and vb i am still getting error but output is generated then what could be the issue

Re: Getting error in imagemagick

Posted: 2014-07-17T04:09:06-07:00
by manmanda
Here is error snapshot
Image

Re: Getting error in imagemagick

Posted: 2014-07-17T05:37:13-07:00
by Werty
Sorry, missed the part where you said you do get output.

As a work around maybe include an error handler and simply ignore the error, something like "On Error Resume Next", dont know how it is in VBS.
Not the best solution, but if it works, who cares.

Re: Getting error in imagemagick

Posted: 2014-07-17T20:32:26-07:00
by manmanda
Thanks i added error handle code and it works fine without showing any error. Thanks for help