ImageMagick: MagickCore, C API for ImageMagick: Loadable Modules
Author: ImageMagick Studio LLC
Description: ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
Keywords: magickcore, c, api, for, imagemagick:, loadable, modules, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert

AcquireModuleInfo • DestroyModuleList • GetModuleInfo • GetModuleInfoList • GetModuleList • GetMagickModulePath • IsModuleTreeInstantiated • InvokeDynamicImageFilter • ListModuleInfo • OpenModule • OpenModules • RegisterModule • TagToCoderModuleName • TagToFilterModuleName • TagToModuleName • UnregisterModule

## AcquireModuleInfo

AcquireModuleInfo() allocates the ModuleInfo structure.

The format of the AcquireModuleInfo method is:

    ModuleInfo *AcquireModuleInfo(const char *path,const char *tag)

A description of each parameter follows:

path
  the path associated with the tag.
tag
  a character string that represents the image format we are looking for.

## DestroyModuleList

DestroyModuleList() unregisters any previously loaded modules and exits the module loaded environment.

The format of the DestroyModuleList module is:

    void DestroyModuleList(void)

## GetModuleInfo

GetModuleInfo() returns a pointer to a ModuleInfo structure that matches the specified tag. If tag is NULL, the head of the module list is returned. If no modules are loaded, or the requested module is not found, NULL is returned.

The format of the GetModuleInfo module is:

    ModuleInfo *GetModuleInfo(const char *tag,ExceptionInfo *exception)

A description of each parameter follows:

tag
  a character string that represents the image format we are looking for.
exception
  return any errors or warnings in this structure.

## GetModuleInfoList

GetModuleInfoList() returns any modules that match the specified pattern.

The format of the GetModuleInfoList function is:

    const ModuleInfo **GetModuleInfoList(const char *pattern,
      size_t *number_modules,ExceptionInfo *exception)

A description of each parameter follows:

pattern
  Specifies a pointer to a text string containing a pattern.
number_modules
  This integer returns the number of modules in the list.
exception
  return any errors or warnings in this structure.

## GetModuleList

GetModuleList() returns any image format modules that match the specified pattern.

The format of the GetModuleList function is:

    char **GetModuleList(const char *pattern,const MagickModuleType type,
      size_t *number_modules,ExceptionInfo *exception)

A description of each parameter follows:

pattern
  Specifies a pointer to a text string containing a pattern.
type
  choose from MagickImageCoderModule or MagickImageFilterModule.
number_modules
  This integer returns the number of modules in the list.
exception
  return any errors or warnings in this structure.

## GetMagickModulePath

GetMagickModulePath() finds a module with the specified module type and filename.

The format of the GetMagickModulePath module is:

    MagickBooleanType GetMagickModulePath(const char *filename,
      MagickModuleType module_type,char *path,ExceptionInfo *exception)

A description of each parameter follows:

filename
  the module file name.
module_type
  the module type: MagickImageCoderModule or MagickImageFilterModule.
path
  the path associated with the filename.
exception
  return any errors or warnings in this structure.

## IsModuleTreeInstantiated

IsModuleTreeInstantiated() determines if the module tree is instantiated. If not, it instantiates the tree and returns it.

The format of the IsModuleTreeInstantiated() method is:

    MagickBooleanType IsModuleTreeInstantiated(Exceptioninfo *exception)

A description of each parameter follows.

exception

return any errors or warnings in this structure.

## InvokeDynamicImageFilter

InvokeDynamicImageFilter() invokes a dynamic image filter.

The format of the InvokeDynamicImageFilter module is:

    MagickBooleanType InvokeDynamicImageFilter(const char *tag,Image **image,
      const int argc,const char **argv,ExceptionInfo *exception)

A description of each parameter follows:

tag
  a character string that represents the name of the particular module.
image
  the image.
argc
  a pointer to an integer describing the number of elements in the argument vector.
argv
  a pointer to a text array containing the command line arguments.
exception
  return any errors or warnings in this structure.

## ListModuleInfo

ListModuleInfo() lists the module info to a file.

The format of the ListModuleInfo module is:

    MagickBooleanType ListModuleInfo(FILE *file,ExceptionInfo *exception)

A description of each parameter follows.

file

An pointer to a FILE.

exception

return any errors or warnings in this structure.

## OpenModule

OpenModule() loads a module, and invokes its registration module. It returns MagickTrue on success, and MagickFalse if there is an error.

The format of the OpenModule module is:

    MagickBooleanType OpenModule(const char *module,ExceptionInfo *exception)

A description of each parameter follows:

module
  a character string that indicates the module to load.
exception
  return any errors or warnings in this structure.

## OpenModules

OpenModules() loads all available modules.

The format of the OpenModules module is:

    MagickBooleanType OpenModules(ExceptionInfo *exception)

A description of each parameter follows:

exception
  return any errors or warnings in this structure.

## RegisterModule

RegisterModule() adds an entry to the module list. It returns a pointer to the registered entry on success.

The format of the RegisterModule module is:

    ModuleInfo *RegisterModule(const ModuleInfo *module_info,
      ExceptionInfo *exception)

A description of each parameter follows:

info
  a pointer to the registered entry is returned.
module_info
  a pointer to the ModuleInfo structure to register.
exception
  return any errors or warnings in this structure.

## TagToCoderModuleName

TagToCoderModuleName() munges a module tag and obtains the filename of the corresponding module.

The format of the TagToCoderModuleName module is:

    char *TagToCoderModuleName(const char *tag,char *name)

A description of each parameter follows:

tag
  a character string representing the module tag.
name
  return the module name here.

## TagToFilterModuleName

TagToFilterModuleName() munges a module tag and returns the filename of the corresponding filter module.

The format of the TagToFilterModuleName module is:

    void TagToFilterModuleName(const char *tag,char name)

A description of each parameter follows:

tag
  a character string representing the module tag.
name
  return the filter name here.

## TagToModuleName

TagToModuleName() munges the module tag name and returns an upper-case tag name as the input string, and a user-provided format.

The format of the TagToModuleName module is:

    TagToModuleName(const char *tag,const char *format,char *module)

A description of each parameter follows:

tag
  the module tag.
format
  a sprintf-compatible format string containing s where the upper-case tag name is to be inserted.
module
  pointer to a destination buffer for the formatted result.

## UnregisterModule

UnregisterModule() unloads a module, and invokes its de-registration module. Returns MagickTrue on success, and MagickFalse if there is an error.

The format of the UnregisterModule module is:

    MagickBooleanType UnregisterModule(const ModuleInfo *module_info,
      ExceptionInfo *exception)

A description of each parameter follows:

module_info
  the module info.
exception
  return any errors or warnings in this structure.