MagickWand  6.7.5
mogrify.c File Reference
#include "MagickWand/studio.h"
#include "MagickWand/MagickWand.h"
#include "MagickWand/mogrify-private.h"
#include "MagickCore/image-private.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/utility-private.h"
Include dependency graph for mogrify.c:

Go to the source code of this file.

Defines

#define UndefinedCompressionQuality   0UL
#define DestroyMogrify()
#define ThrowMogrifyException(asperity, tag, option)
#define ThrowMogrifyInvalidArgumentException(option, argument)
#define MogrifyImageTag   "Mogrify/Image"

Functions

WandExport MagickBooleanType MagickCommandGenesis (ImageInfo *image_info, MagickCommand command, int argc, char **argv, char **metadata, ExceptionInfo *exception)
static Image * GetImageCache (const ImageInfo *image_info, const char *path, ExceptionInfo *exception)
static MagickBooleanType IsPathWritable (const char *path)
static ssize_t MagickMax (const ssize_t x, const ssize_t y)
static MagickBooleanType MonitorProgress (const char *text, const MagickOffsetType offset, const MagickSizeType extent, void *wand_unused(client_data))
static Image * SparseColorOption (const Image *image, const SparseColorMethod method, const char *arguments, const MagickBooleanType color_from_image, ExceptionInfo *exception)
WandExport MagickBooleanType MogrifyImage (ImageInfo *image_info, const int argc, const char **argv, Image **image, ExceptionInfo *exception)
static MagickBooleanType 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 MagickBooleanType post, const int argc, const char **argv, Image **images, ExceptionInfo *exception)

Variables

static const char MogrifyBackgroundColor [] = "#ffffff"
static const char MogrifyBorderColor [] = "#dfdfdf"
static const char MogrifyMatteColor [] = "#bdbdbd"

Define Documentation

#define DestroyMogrify ( )
Value:
{ \
  if (format != (char *) NULL) \
    format=DestroyString(format); \
  if (path != (char *) NULL) \
    path=DestroyString(path); \
  DestroyImageStack(); \
  for (i=0; i < (ssize_t) argc; i++) \
    argv[i]=DestroyString(argv[i]); \
  argv=(char **) RelinquishMagickMemory(argv); \
}

Referenced by MogrifyImageCommand().

#define MogrifyImageTag   "Mogrify/Image"

Referenced by MogrifyImages().

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

Referenced by MogrifyImageCommand().

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

Referenced by MogrifyImageCommand().

#define UndefinedCompressionQuality   0UL

Definition at line 69 of file mogrify.c.

Referenced by MogrifyImageInfo().


Function Documentation

static Image* GetImageCache ( const ImageInfo *  image_info,
const char *  path,
ExceptionInfo *  exception 
) [inline, static]

Definition at line 335 of file mogrify.c.

References MaxTextExtent, and image.

Referenced by MogrifyImage().

static MagickBooleanType IsPathWritable ( const char *  path) [static]

Definition at line 369 of file mogrify.c.

Referenced by MogrifyImageCommand().

WandExport MagickBooleanType MagickCommandGenesis ( ImageInfo *  image_info,
MagickCommand  command,
int  argc,
char **  argv,
char **  metadata,
ExceptionInfo *  exception 
)

Definition at line 111 of file mogrify.c.

static ssize_t MagickMax ( const ssize_t  x,
const ssize_t  y 
) [inline, static]

Definition at line 378 of file mogrify.c.

Referenced by MogrifyImage(), MogrifyImageInfo(), and MogrifyImageList().

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_unusedmetadata,
ExceptionInfo *  exception 
)
WandExport MagickBooleanType MogrifyImageList ( ImageInfo *  image_info,
const int  argc,
const char **  argv,
Image **  images,
ExceptionInfo *  exception 
)

Definition at line 7211 of file mogrify.c.

References quantize_info, MagickMax(), MogrifyImageInfo(), image, and MaxTextExtent.

Referenced by MogrifyImages().

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

Definition at line 8170 of file mogrify.c.

References MogrifyImage(), MogrifyImageList(), and MogrifyImageTag.

static MagickBooleanType MogrifyUsage ( void  ) [static]

Definition at line 3255 of file mogrify.c.

Referenced by MogrifyImageCommand().

static MagickBooleanType MonitorProgress ( const char *  text,
const MagickOffsetType  offset,
const MagickSizeType  extent,
void *  wand_unusedclient_data 
) [static]

Definition at line 385 of file mogrify.c.

References MaxTextExtent.

Referenced by MogrifyImage(), and MogrifyImageInfo().

static Image* SparseColorOption ( const Image *  image,
const SparseColorMethod  method,
const char *  arguments,
const MagickBooleanType  color_from_image,
ExceptionInfo *  exception 
) [static]

Definition at line 423 of file mogrify.c.

References MaxTextExtent.

Referenced by MogrifyImage().


Variable Documentation

const char MogrifyBackgroundColor[] = "#ffffff" [static]

Definition at line 62 of file mogrify.c.

Referenced by MogrifyImageInfo().

const char MogrifyBorderColor[] = "#dfdfdf"

Definition at line 63 of file mogrify.c.

Referenced by MogrifyImage(), and MogrifyImageInfo().

const char MogrifyMatteColor[] = "#bdbdbd"

Definition at line 64 of file mogrify.c.

Referenced by MogrifyImageInfo().