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: Ryan Rusaw
Subject: Re: Changes in GraphicsMagick-1.3.8
Date: Thu, 28 Jan 2010 10:55:37 -0600



On Thu, Jan 28, 2010 at 3:57 AM, Marco Atzeri <address@hidden> wrote:
--- Gio 28/1/10, Benjamin Lindner  ha scritto:

> > Hi,
> > testing GM 1.3.8 versus previous 1.3.7 with octave
> 3.2.4,
> > I discovered that from this version:
> >
> > "The InitializeMagick() function MUST be invoked
> before constructing any
> > Magick++ objects".
> >
> > http://www.graphicsmagick.org/Magick++/index.html
> > http://www.graphicsmagick.org/api/api.html
> >
> > Otherwise a nice crash will happen.
> >
> > As I see no InitializeMagick call also in the hg
> source,
> > Where is the best place to put this call within
> __magick_read__.cc ?
>
> If you build a Windows DLL, then InitializeMagick() is
> automatically
> called within the DllMain() function when the library is
> loaded
> the first time.
>
> Take a look at the source code in magick/nt_base.c
>
> I don't know what will happen if you call it more than
> once, though.
>
> benjamin

I think nt_base is not build on cygwin.
magick_libGraphicsMagick_la-nt_base.Plo is just a dummy.

In any case the requirement is valid for the real Unix system.

I will ask the author for suggestion.

Regards
Marco


Something like this in __magick_read__.cc should work in the Unix case.

void __attribute__ ((constructor))
_initialize_magick_(void)
{
InitializeMagick("");
}

Ryan

reply via email to

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