Re: RegisterStaticModules depreciated -> how to register formats now?

Pro Turm <[email protected]> Mon, 10 Feb 2020 19:02:53 +0100 (CET)
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
How do you combine calling the static calls like OpenModule() from a C++ class?

> On February 10, 2020 6:56 PM Pro Turm <[email protected]> wrote:
> 
>  
> Thank you! But who calls OpenModule()? Do you have an example for a static app?
> 
> > On February 10, 2020 6:24 PM Bob Friesenhahn <[email protected]> wrote:
> > 
> >  
> > On Mon, 10 Feb 2020, Pro Turm wrote:
> > 
> > > RegisterStaticModules has been declared as depreciated, and its not part anymore from InitializeMagickInfoList().
> > >
> > > What is the way to register formats then and where are the calls like e.g. registerPNGformat are supposed to be called from? Is there any example out there?
> > 
> > In static/moby builds, the formats are registered via entries in 
> > magick/static.c.  The module initialization callback is
> > registered here such that when OpenModule() is called and the static 
> > module is not already "loaded", its registration functions are called. 
> > Similarly, the module destruction callback is invoked to "unload" it 
> > before the program quits.  This makes behavior with static modules 
> > more like when real loadable modules are used.
> > 
> > You will find code like
> > 
> > #if defined(HasPNG)
> >    STATICM("PNG",RegisterPNGImage,UnregisterPNGImage),
> > #endif
> > 
> > in magick/static.c.
> > 
> > Bob
> > -- 
> > Bob Friesenhahn
> > [email protected], http://www.simplesystems.org/users/bfriesen/
> > GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> > Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
> 
> 
> _______________________________________________
> Graphicsmagick-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help