octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes in GraphicsMagick-1.3.8


From: John W. Eaton
Subject: Re: Changes in GraphicsMagick-1.3.8
Date: Thu, 28 Jan 2010 15:26:27 -0500

On 28-Jan-2010, Ryan Rusaw wrote:

| Something like this in __magick_read__.cc should work in the Unix case.
| 
| void __attribute__ ((constructor))
| _initialize_magick_(void)
| {
| InitializeMagick("");
| }

But the documentation for Magick::InitializeMagick says

  This function should be invoked in the primary (original) thread of
  the application's process, and before starting any OpenMP threads,
  as part of program initialization.

Calling it in a dynamically loaded plug-in at some arbitrary time in
the execution of the program does not seem to match that
recommentation, though maybe we are currently OK because we don't
start any OpenMP threads.  But what if we do at some point in the
future?  Then what?.  So is calling it in the dynamically loaded
function really OK?

OK, I just found this information:

  This initialization step is not required under Unix, Linux, Cygwin,
  or any other operating environment that supports the notion of
  "installing" ImageMagick in a known location.

So instead of passing in "", I'd guess we could just omit the the call
to Magick::InitializeMagick.  But we also have to work on Windows
systems, so what do we do there?

Also, what about the DestroyMagick fucntion?  Do we need to ensure
that it is called if __magick_read__ is cleared and the
__magick_read__.oct file is unloaded?

  Description

  DestroyMagick() destroys the GraphicsMagick environment. This
  function should be invoked in the primary (original) thread of the
  application's process while shutting down, and only after any
  threads which might be using GraphicsMagick functions have
  terminated.


jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]