<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML> <HEAD><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE>magick - Methods to Read or List ImageMagick Image formats</TITLE> <link rel="StyleSheet" href="../magick.css" type="text/css"> </HEAD> <body bgcolor="#FFFFFF" text="#000000" link="#0085c0" alink="#0085c0" vlink="#800080"> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> <LI><A HREF="#name"> <FONT SIZE=-1>NAME</FONT></A> <LI><A HREF="#synopsis"> <FONT SIZE=-1>SYNOPSIS</FONT></A> <LI><A HREF="#function descriptions"> <FONT SIZE=-1>FUNCTION</FONT> <FONT SIZE=-1>DESCRIPTIONS</FONT></A> <UL> <LI><A HREF="#destroymagick">DestroyMagick</A> <LI><A HREF="#destroymagickinfo">DestroyMagickInfo</A> <LI><A HREF="#getimagemagick">GetImageMagick</A> <LI><A HREF="#getmagickconfigurepath">GetMagickConfigurePath</A> <LI><A HREF="#getmagickinfo">GetMagickInfo</A> <LI><A HREF="#getmagickversion">GetMagickVersion</A> <LI><A HREF="#initializemagick">InitializeMagick</A> <LI><A HREF="#ismagickconflict">IsMagickConflict</A> <LI><A HREF="#listmagickinfo">ListMagickInfo</A> <LI><A HREF="#registermagickinfo">RegisterMagickInfo</A> <LI><A HREF="#setmagickinfo">SetMagickInfo</A> <LI><A HREF="#unregistermagickinfo">UnregisterMagickInfo</A> </UL> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name"> <FONT SIZE=-1>NAME</FONT></A></H1> <P>magick - Methods to Read or List ImageMagick Image formats</P> <P> <HR> <H1><A NAME="synopsis"> <FONT SIZE=-1>SYNOPSIS</FONT></A></H1> <P><STRONG>DestroyMagick</STRONG>( void );</P> <P>void <STRONG>DestroyMagickInfo</STRONG>( void );</P> <P>const char * <STRONG>GetImageMagick</STRONG>( const unsigned char *magick, const size_t length );</P> <P>char * <STRONG>GetMagickConfigurePath</STRONG>( const char *filename, ExceptionInfo *exception );</P> <P>const MagickInfo * <STRONG>GetMagickInfo</STRONG>( const char *name, Exception *exception );</P> <P>const char * <STRONG>GetMagickVersion</STRONG>( unsigned int *version );</P> <P><STRONG>InitializeMagick</STRONG>( const char *path );</P> <P>unsigned int <STRONG>IsMagickConflict</STRONG>( const char *magick );</P> <P>unsigned int <STRONG>ListMagickInfo</STRONG>( <FONT SIZE=-1>FILE</FONT> *file, ExceptionInfo *exception );</P> <P>MagickInfo * <STRONG>RegisterMagickInfo</STRONG>( MagickInfo *magick_info );</P> <P>MagickInfo * <STRONG>SetMagickInfo</STRONG>( const char *name );</P> <P>unsigned int <STRONG>UnregisterMagickInfo</STRONG>( const char *name );</P> <P> <HR> <H1><A NAME="function descriptions"> <FONT SIZE=-1>FUNCTION</FONT> <FONT SIZE=-1>DESCRIPTIONS</FONT></A></H1> <P> <H2><A NAME="destroymagick">DestroyMagick</A></H2> <blockquote>DestroyMagick() destroys the ImageMagick environment. </blockquote><P>The format of the DestroyMagick function is:</P> <blockquote>DestroyMagick ( void ); </blockquote><P> <H2><A NAME="destroymagickinfo">DestroyMagickInfo</A></H2> <blockquote>DestroyMagickInfo() deallocates memory associated <A HREF="types/MagickInfo.html">MagickInfo</A> list. </blockquote><P>The format of the DestroyMagickInfo method is:</P> <blockquote>void DestroyMagickInfo ( void ); </blockquote><P> <H2><A NAME="getimagemagick">GetImageMagick</A></H2> <blockquote>GetImageMagick() searches for an image format that matches the specified magick string. If one is found the name is returned otherwise NULL. </blockquote><P>The format of the GetImageMagick method is:</P> <blockquote>const char *GetImageMagick ( const unsigned char *magick, const size_t length ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_magick%3A">magick:</A></STRONG><BR> <DD> The image format we are searching for. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_length%3A">length:</A></STRONG><BR> <DD> The length of the binary string. <P></P></DL></DL> <P> <H2><A NAME="getmagickconfigurepath">GetMagickConfigurePath</A></H2> <blockquote>GetMagickConfigurePath() searches a number of pre-defined locations for the specified ImageMagick configuration file and returns the path. The search order follows: </blockquote><PRE> <current directory>/ Windows Resource <client path>/ $MAGICK_HOME/ $HOME/.magick/ MagickLibPath MagickModulesPath MagickSharePath</PRE> <P>The format of the GetMagickConfigurePath method is:</P> <blockquote>char *GetMagickConfigurePath ( const char *filename, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_path%3A">path:</A></STRONG><BR> <DD> Method GetMagickConfigurePath returns the path if the configuration file is found, otherwise <FONT SIZE=-1>NULL</FONT> is returned. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_filename%3A">filename:</A></STRONG><BR> <DD> <FONT SIZE=-1>A</FONT> character string representing the desired configuration file. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_exception%3A">exception:</A></STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="getmagickinfo">GetMagickInfo</A></H2> <blockquote>GetMagickInfo() returns a pointer <A HREF="types/MagickInfo.html">MagickInfo</A> structure that matches the specified name. If name is NULL, the head of the image format list is returned. </blockquote><P>The format of the GetMagickInfo method is:</P> <blockquote>const <A HREF="types/MagickInfo.html">MagickInfo</A> *GetMagickInfo ( const char *name, Exception *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_name%3A">name:</A></STRONG><BR> <DD> The image format we are looking for. <P></P> <dd><p></p><dt><STRONG>exception:</STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="getmagickversion">GetMagickVersion</A></H2> <blockquote>GetMagickVersion() returns the ImageMagick API version as a string and as a number. </blockquote><P>The format of the GetMagickVersion method is:</P> <blockquote>const char *GetMagickVersion ( unsigned int *version ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_version%3A">version:</A></STRONG><BR> <DD> The ImageMagick version is returned as a number. <P></P></DL></DL> <P> <H2><A NAME="initializemagick">InitializeMagick</A></H2> <blockquote>InitializeMagick() initializes the ImageMagick environment. </blockquote><P>The format of the InitializeMagick function is:</P> <blockquote>InitializeMagick ( const char *path ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>path:</STRONG><BR> <DD> The execution path of the current ImageMagick client. <P></P></DL></DL> <P> <H2><A NAME="ismagickconflict">IsMagickConflict</A></H2> <P>Method IsMagickConflict returns true if the image format conflicts with a logical drive (.e.g. <FONT SIZE=-1>X:).</FONT></P> <P>The format of the IsMagickConflict method is:</P> <blockquote>unsigned int IsMagickConflict ( const char *magick ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_status%3A">status:</A></STRONG><BR> <DD> Method IsMagickConflict returns true if the image format conflicts with a logical drive. <P></P> <dd><p></p><dt><STRONG>magick:</STRONG><BR> <DD> Specifies the image format. <P></P></DL></DL> <P> <H2><A NAME="listmagickinfo">ListMagickInfo</A></H2> <blockquote>ListMagickInfo() lists the image formats to a file. </blockquote><P>The format of the ListMagickInfo method is:</P> <blockquote>unsigned int ListMagickInfo ( FILE *file, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows.</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_file%3A">file:</A></STRONG><BR> <DD> <FONT SIZE=-1>A</FONT> file handle. <P></P> <dd><p></p><dt><STRONG>exception:</STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="registermagickinfo">RegisterMagickInfo</A></H2> <blockquote>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. </blockquote><P>The format of the RegisterMagickInfo method is:</P> <blockquote><A HREF="types/MagickInfo.html">MagickInfo</A> *RegisterMagickInfo ( <A HREF="types/MagickInfo.html">MagickInfo</A> *magick_info ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_magick_info%3A">magick_info:</A></STRONG><BR> <DD> The magick info. <P></P></DL></DL> <P> <H2><A NAME="setmagickinfo">SetMagickInfo</A></H2> <P>Method SetMagickInfo allocates a MagickInfo structure and initializes the members to default values.</P> <P>The format of the SetMagickInfo method is:</P> <blockquote><A HREF="types/MagickInfo.html">MagickInfo</A> *SetMagickInfo ( const char *name ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>magick_info:</STRONG><BR> <DD> Method SetMagickInfo returns the allocated and initialized MagickInfo structure. <P></P> <dd><p></p><dt><STRONG>name:</STRONG><BR> <DD> a character string that represents the image format associated with the MagickInfo structure. <P></P></DL></DL> <P> <H2><A NAME="unregistermagickinfo">UnregisterMagickInfo</A></H2> <P>Method UnregisterMagickInfo removes a name from the magick info list. It returns False if the name does not exist in the list otherwise True.</P> <P>The format of the UnregisterMagickInfo method is:</P> <blockquote>unsigned int UnregisterMagickInfo ( const char *name ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>status:</STRONG><BR> <DD> Method UnregisterMagickInfo returns False if the name does not exist in the list otherwise True. <P></P> <dd><p></p><dt><STRONG>name:</STRONG><BR> <DD> a character string that represents the image format we are looking for. </DL></DL> </BODY> </HTML>