MagickCore, C API: Mime Methods @ ImageMagick
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:, mime, methods, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert

AcquireMimeCache • GetMimeInfoList • GetMimeList • GetMimeDescription • GetMimeType • ListMimeInfo

## AcquireMimeCache

AcquireMimeCache() caches one or more magic configurations which provides a mapping between magic attributes and a magic name.

The format of the AcquireMimeCache method is:

    LinkedListInfo *AcquireMimeCache(const char *filename,
      ExceptionInfo *exception)

A description of each parameter follows:

filename
  the font file name.
exception
  return any errors or warnings in this structure.

## GetMimeInfoList

GetMimeInfoList() returns any image aliases that match the specified pattern.

The magic of the GetMimeInfoList function is:

    const MimeInfo **GetMimeInfoList(const char *pattern,
      size_t *number_aliases,ExceptionInfo *exception)

A description of each parameter follows:

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

## GetMimeList

GetMimeList() returns any image format alias that matches the specified pattern.

The format of the GetMimeList function is:

    char **GetMimeList(const char *pattern,size_t *number_aliases,
      ExceptionInfo *exception)

A description of each parameter follows:

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

## GetMimeDescription

GetMimeDescription() returns the mime type description.

The format of the GetMimeDescription method is:

    const char *GetMimeDescription(const MimeInfo *mime_info)

A description of each parameter follows:

mime_info
  The magic info.

## GetMimeType

GetMimeType() returns the mime type.

The format of the GetMimeType method is:

    const char *GetMimeType(const MimeInfo *mime_info)

A description of each parameter follows:

mime_info
  The magic info.

## ListMimeInfo

ListMimeInfo() lists the magic info to a file.

The format of the ListMimeInfo method is:

    MagickBooleanType ListMimeInfo(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.