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
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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.
ChrisRChamberlain

Post by ChrisRChamberlain »

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:
ChrisRChamberlain

Post by ChrisRChamberlain »

RobertThompson

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