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?".
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
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
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
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
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.
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.