mogrify.c File Reference

#include "wand/studio.h"
#include "wand/MagickWand.h"
#include "wand/mogrify-private.h"
#include "magick/thread-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 int IsPathDirectory (const char *path)
static MagickBooleanType IsPathWritable (const char *path)
static long MagickMax (const long x, const long 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 ChannelType channel, 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 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); \
  DestroyImageStack(); \
  for (i=0; i < (long) 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 55 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 262 of file mogrify.c.

References MaxTextExtent.

Referenced by MogrifyImage().

static int IsPathDirectory ( const char *  path  )  [static]

Definition at line 292 of file mogrify.c.

References S_ISDIR.

Referenced by MogrifyImage().

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

Definition at line 310 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 101 of file mogrify.c.

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

Definition at line 319 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 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 
)

Definition at line 7340 of file mogrify.c.

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

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 8197 of file mogrify.c.

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

static MagickBooleanType MogrifyUsage ( void   )  [static]

Definition at line 3569 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 326 of file mogrify.c.

References MaxTextExtent.

Referenced by MogrifyImage(), and MogrifyImageInfo().

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

Definition at line 363 of file mogrify.c.

References MaxTextExtent, and QuantumScale.

Referenced by MogrifyImage().


Variable Documentation

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

Definition at line 61 of file mogrify.c.

Referenced by MogrifyImageInfo().

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

Definition at line 62 of file mogrify.c.

Referenced by MogrifyImage(), and MogrifyImageInfo().

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

Definition at line 63 of file mogrify.c.

Referenced by MogrifyImageInfo().


Generated on 19 Nov 2009 for MagickWand by  doxygen 1.6.1