- NAME
- SYNOPSIS
- FUNCTION DESCRIPTIONS
  - DestroyMagick
  - DestroyMagickInfo
  - GetImageMagick
  - GetMagickConfigurePath
  - GetMagickInfo
  - GetMagickVersion
  - InitializeMagick
  - IsMagickConflict
  - ListMagickInfo
  - RegisterMagickInfo
  - SetMagickInfo
  - UnregisterMagickInfo

# NAME

magick - Methods to Read or List ImageMagick Image formats

# SYNOPSIS

DestroyMagick( void );

void DestroyMagickInfo( void );

const char * GetImageMagick( const unsigned char *magick, const size_t length );

char * GetMagickConfigurePath( const char *filename, ExceptionInfo *exception );

const MagickInfo * GetMagickInfo( const char *name, Exception *exception );

const char * GetMagickVersion( unsigned int *version );

InitializeMagick( const char *path );

unsigned int IsMagickConflict( const char *magick );

unsigned int ListMagickInfo( FILE *file, ExceptionInfo *exception );

MagickInfo * RegisterMagickInfo( MagickInfo *magick_info );

MagickInfo * SetMagickInfo( const char *name );

unsigned int UnregisterMagickInfo( const char *name );

# FUNCTION DESCRIPTIONS

## DestroyMagick

> DestroyMagick() destroys the ImageMagick environment.

The format of the DestroyMagick function is:

> DestroyMagick ( void );

## DestroyMagickInfo

> DestroyMagickInfo() deallocates memory associated MagickInfo list.

The format of the DestroyMagickInfo method is:

> void DestroyMagickInfo ( void );

## GetImageMagick

> GetImageMagick() searches for an image format that matches the specified magick string. If one is found the name is returned otherwise NULL.

The format of the GetImageMagick method is:

> const char *GetImageMagick ( const unsigned char *magick, const size_t length );

A description of each parameter follows:

  magick:
    The image format we are searching for.

  length:
    The length of the binary string.

## GetMagickConfigurePath

> GetMagickConfigurePath() searches a number of pre-defined locations for the specified ImageMagick configuration file and returns the path. The search order follows:

               <current directory>/
               <client path>/
               $MAGICK_HOME/
               $HOME/.magick/
               $MAGICK_FONT_PATH
               MagickLibPath
               MagickModulesPath
               MagickSharePath
               Windows Resource

The format of the GetMagickConfigurePath method is:

> char *GetMagickConfigurePath ( const char *filename, ExceptionInfo *exception );

A description of each parameter follows:

  path:
    Method GetMagickConfigurePath returns the path if the configuration file is found, otherwise NULL is returned.

  filename:
    A character string representing the desired configuration file.

  exception:
    Return any errors or warnings in this structure.

## GetMagickInfo

> GetMagickInfo() returns a pointer MagickInfo structure that matches the specified name. If name is NULL, the head of the image format list is returned.

The format of the GetMagickInfo method is:

> const MagickInfo *GetMagickInfo ( const char *name, Exception *exception );

A description of each parameter follows:

  name:
    The image format we are looking for.

  exception:
    Return any errors or warnings in this structure.

## GetMagickVersion

> GetMagickVersion() returns the ImageMagick API version as a string and as a number.

The format of the GetMagickVersion method is:

> const char *GetMagickVersion ( unsigned int *version );

A description of each parameter follows:

  version:
    The ImageMagick version is returned as a number.

## InitializeMagick

> InitializeMagick() initializes the ImageMagick environment.

The format of the InitializeMagick function is:

> InitializeMagick ( const char *path );

A description of each parameter follows:

  path:
    The execution path of the current ImageMagick client.

## IsMagickConflict

Method IsMagickConflict returns true if the image format conflicts with a logical drive (.e.g. X:).

The format of the IsMagickConflict method is:

> unsigned int IsMagickConflict ( const char *magick );

A description of each parameter follows:

  status:
    Method IsMagickConflict returns true if the image format conflicts with a logical drive.

  magick:
    Specifies the image format.

## ListMagickInfo

> ListMagickInfo() lists the image formats to a file.

The format of the ListMagickInfo method is:

> unsigned int ListMagickInfo ( FILE *file, ExceptionInfo *exception );

A description of each parameter follows.

  file:
    A file handle.

  exception:
    Return any errors or warnings in this structure.

## RegisterMagickInfo

> RegisterMagickInfo() adds attributes for a particular image format to the list of supported formats. The attributes include the image format name, a method to read and/or write the format, whether the format supports the saving of more than one frame to the same file or blob, whether the format supports native in-memory I/O, and a brief description of the format.

The format of the RegisterMagickInfo method is:

> MagickInfo *RegisterMagickInfo ( MagickInfo *magick_info );

A description of each parameter follows:

  magick_info:
    The magick info.

## SetMagickInfo

Method SetMagickInfo allocates a MagickInfo structure and initializes the members to default values.

The format of the SetMagickInfo method is:

> MagickInfo *SetMagickInfo ( const char *name );

A description of each parameter follows:

  magick_info:
    Method SetMagickInfo returns the allocated and initialized MagickInfo structure.

  name:
    a character string that represents the image format associated with the MagickInfo structure.

## UnregisterMagickInfo

Method UnregisterMagickInfo removes a name from the magick info list. It returns False if the name does not exist in the list otherwise True.

The format of the UnregisterMagickInfo method is:

> unsigned int UnregisterMagickInfo ( const char *name );

A description of each parameter follows:

  status:
    Method UnregisterMagickInfo returns False if the name does not exist in the list otherwise True.

  name:
    a character string that represents the image format we are looking for.