# mogrify.c File Reference

`#include "wand/studio.h"`
`#include "wand/MagickWand.h"`
`#include "wand/mogrify-private.h"`

## Defines
#define | UndefinedCompressionQuality 0UL
#define | X_OK 1
#define | DestroyMogrify()
#define | ThrowMogrifyException(asperity, tag, option)
#define | ThrowMogrifyInvalidArgumentException(option, argument)
#define | MogrifyImageTag "Mogrify/Image"
## Functions
static int | IsDirectory (const char *path)
static long | MagickMax (const long x, const long y)
static MagickBooleanType | MonitorProgress (const char *tag, const MagickOffsetType quantum, const MagickSizeType span, void *wand_unused(client_data))
WandExport MagickBooleanType | MogrifyImage (ImageInfo *image_info, const int argc, const char **argv, Image **image, ExceptionInfo *exception)
static void | MogrifyUsage (void)
WandExport MagickBooleanType | MogrifyImageCommand (ImageInfo *image_info, int argc, char **argv, char **wand_unused(metadata), ExceptionInfo *exception)
WandExport MagickBooleanType | MogrifyImageInfo (ImageInfo *image_info, const int argc, const char **argv, ExceptionInfo *exception)
WandExport MagickBooleanType | MogrifyImageList (ImageInfo *image_info, const int argc, const char **argv, Image **images, ExceptionInfo *exception)
WandExport MagickBooleanType | MogrifyImages (ImageInfo *image_info, const int argc, const char **argv, Image **images, ExceptionInfo *exception)
## Variables
static const char * | BackgroundColor = "#fff"
static const char * | BorderColor = "#dfdfdf"
static const char * | MatteColor = "#bdbdbd"

## Define Documentation

#define DestroyMogrify | ( |  | ) |

Value:

    { \
      if (format != (char *) NULL) \
        format=DestroyString(format); \
      if (path != (char *) NULL) \
        path=DestroyString(path); \
      for ( ; k >= 0; k--) \
        image_stack[k]=DestroyImageList(image_stack[k]); \
      for (i=0; i < (long) argc; i++) \
        argv[i]=DestroyString(argv[i]); \
      argv=(char **) RelinquishMagickMemory(argv); \
    }

#define MogrifyImageTag "Mogrify/Image"

#define ThrowMogrifyException | ( | asperity,
|  | tag,
|  | option |  | ) |

Value:

    { \
      (void) ThrowMagickException(exception,GetMagickModule(),asperity,tag,"`%s'", \
        option); \
      DestroyMogrify(); \
      return(MagickFalse); \
    }

#define ThrowMogrifyInvalidArgumentException | ( | option,
|  | argument |  | ) |

Value:

    { \
      (void) ThrowMagickException(exception,GetMagickModule(),OptionError, \
        "InvalidArgument","`%s': %s",argument,option); \
      DestroyMogrify(); \
      return(MagickFalse); \
    }

#define UndefinedCompressionQuality 0UL

#define X_OK 1

## Function Documentation

static int IsDirectory | ( | const char * | path | ) | `[static]`

static long MagickMax | ( | const long | x,
|  | const long | y |
| ) |  |  | `[inline, static]`

WandExport MagickBooleanType MogrifyImage | ( | ImageInfo * | image_info,
|  | const int | argc,
|  | const char ** | argv,
|  | Image ** | image,
|  | ExceptionInfo * | exception |
| ) |  |  |

WandExport MagickBooleanType MogrifyImageCommand | ( | ImageInfo * | image_info,
|  | int | argc,
|  | char ** | argv,
|  | char ** | wand_unused(metadata),
|  | ExceptionInfo * | exception |
| ) |  |  |

WandExport MagickBooleanType MogrifyImageInfo | ( | ImageInfo * | image_info,
|  | const int | argc,
|  | const char ** | argv,
|  | ExceptionInfo * | exception |
| ) |  |  |

WandExport MagickBooleanType MogrifyImageList | ( | ImageInfo * | image_info,
|  | const int | argc,
|  | const char ** | argv,
|  | Image ** | images,
|  | ExceptionInfo * | exception |
| ) |  |  |

WandExport MagickBooleanType MogrifyImages | ( | ImageInfo * | image_info,
|  | const int | argc,
|  | const char ** | argv,
|  | Image ** | images,
|  | ExceptionInfo * | exception |
| ) |  |  |

static void MogrifyUsage | ( | void |  | ) | `[static]`

static MagickBooleanType MonitorProgress | ( | const char * | tag,
|  | const MagickOffsetType | quantum,
|  | const MagickSizeType | span,
|  | void * | wand_unused(client_data) |
| ) |  |  | `[static]`

## Variable Documentation

const char* BackgroundColor = "#fff"`[static]`

const char * BorderColor = "#dfdfdf"`[static]`

const char * MatteColor = "#bdbdbd"`[static]`