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 » 2014-07-10T21:25:05-07:00

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

Re: Getting error in imagemagick

Post by Werty » 2014-07-12T12:10:02-07:00

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 » 2014-07-13T11:14:48-07:00

Tried still getting same error :(

Werty
Posts: 64
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Getting error in imagemagick

Post by Werty » 2014-07-13T18:55:53-07:00

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 » 2014-07-17T04:04:38-07:00

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 » 2014-07-17T04:09:06-07:00

Here is error snapshot
Image

Werty
Posts: 64
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Getting error in imagemagick

Post by Werty » 2014-07-17T05:37:13-07:00

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 » 2014-07-17T20:32:26-07:00

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

Post Reply