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

Bob Friesenhahn <[email protected]> Mon, 10 Feb 2020 11:24:14 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
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