ImageMagickObject -- [...]: 0: exception: access violation

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
User avatar
Site Admin
Posts: 10994
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2005-11-17T20:57:38-07:00

ImageMagick COM+ is a contributed project but we do our best to maintain it. For testing, we only have the two scripts that comes with the project and we ensure it executes properly before any ImageMagick release. If you can provide a small script that can we can use to reliably reproduce the problem we will provide a fix, hopefully within a few days.


Post by ChrisRChamberlain » 2006-01-25T06:30:20-07:00

FYI, have found similar problem in MS Visual Foxpro but a somewhat quirky fix seems to work for reasons unknown.

There were 3 successive calls to the ImageMagickObject, (latest version), being :-

Code: Select all

lcWidth = oMagickImage.Identify([-format],[%w],lcFilename)
lcHeight = oMagickImage.Identify([-format],[%h],lcFilename)
lcSize = lcWidth+[x]+lcHeight
lcProperties =oMagickImage.Convert([-sample],lcSize,lcFilename,[C:\temp\output.eps])
The 3 test files which would consistently produce errors were .jpgs of 800kb or more and the calls to the object could fail on any one but in particular on Convert, the errors trapped by TRY, CATCH, ENDTRY.

By placing

Code: Select all

lcSignature = oMagickImage.Identify([-format],[%#],lcFilename)
before the other three calls seems to resolve the issue.

Answers on a postcard, please :shock:


Post by ChrisRChamberlain » 2006-02-15T22:08:02-07:00


Interesting observation - when time permits, I'm going to try passing all parameters, including "-format" etc, as local variables.

Will advise success or otherwise.

Post Reply