Getting error in imagemagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Getting error in imagemagick

Post 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
Werty
Posts: 66
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Getting error in imagemagick

Post 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
Windows 7 user
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Re: Getting error in imagemagick

Post by manmanda »

Tried still getting same error :(
Werty
Posts: 66
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Getting error in imagemagick

Post 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.
Windows 7 user
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Re: Getting error in imagemagick

Post 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
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Re: Getting error in imagemagick

Post by manmanda »

Here is error snapshot
Image
Werty
Posts: 66
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Getting error in imagemagick

Post 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.
Windows 7 user
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

Re: Getting error in imagemagick

Post by manmanda »

Thanks i added error handle code and it works fine without showing any error. Thanks for help
Post Reply