ImageMagickObject - How To Access STDERR

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
billbell52

ImageMagickObject - How To Access STDERR

Post by billbell52 »

I pulled ImageMagicObject source and I am trying to figure out how to modify it to access STDERR. Some IM commands output info to STDERR. Like the compare command outputs location info to STDERR. Example using command line:

compare -metric rmse -dissimilarity-threshold 1 c:\temp\main.bmp c:\temp\sub.bmp c:\result.bmp 2>c:\temp\loc.txt

When using ImageMagickObject I don't see how to access STDERR. Is there a way? Example using ImageMagickObject and Excel VBA:

Sub TestCompare()

Dim imgObj As Object
Dim loc As Variant
Dim mainImage As String
Dim subImage As String
Dim resultImage As String

mainImage = "C:\temp\main.bmp"
subImage = "C:\temp\sub.bmp"
resultImage = "C:\temp\result.bmp"

Set imgObj = CreateObject("ImageMagickObject.MagickImage.1")
loc = imgObj.Compare("-metric", "rmse", "-dissimilarity-threshold", "1", mainImage, subImage, resultImage)
Set imgObj = Nothing
End Sub

Do any developers have any ideas on how to modify ImageMagikObject to enable STDERR to be seen. I studied the code and it was not obvious.
Post Reply