MagickWand 7.1.0
Convert, Edit, Or Compose Bitmap Images
mogrify.c File Reference
#include "MagickWand/studio.h"
#include "MagickWand/MagickWand.h"
#include "MagickWand/magick-wand-private.h"
#include "MagickWand/mogrify-private.h"
#include "MagickCore/blob-private.h"
#include "MagickCore/color-private.h"
#include "MagickCore/composite-private.h"
#include "MagickCore/image-private.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/utility-private.h"
Include dependency graph for mogrify.c:

Go to the source code of this file.

Macros

#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 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 MogrifyAlphaColor [] = "#bdbdbd"
 
static const char MogrifyBackgroundColor [] = "#ffffff"
 
static const char MogrifyBorderColor [] = "#dfdfdf"
 

Macro Definition Documentation

◆ DestroyMogrify

#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); \
}

◆ MogrifyImageTag

#define MogrifyImageTag   "Mogrify/Image"

◆ ThrowMogrifyException

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

◆ ThrowMogrifyInvalidArgumentException

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

◆ UndefinedCompressionQuality

#define UndefinedCompressionQuality   0UL

Definition at line 77 of file mogrify.c.

Function Documentation

◆ GetImageCache()

static Image * GetImageCache ( const ImageInfo *  image_info,
const char *  path,
ExceptionInfo *  exception 
)
inlinestatic

Definition at line 368 of file mogrify.c.

References MagickPathExtent.

Referenced by MogrifyImage().

◆ IsPathWritable()

static MagickBooleanType IsPathWritable ( const char *  path)
inlinestatic

Definition at line 402 of file mogrify.c.

Referenced by MogrifyImageCommand().

◆ MagickCommandGenesis()

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

Definition at line 125 of file mogrify.c.

References MagickPathExtent.

◆ MogrifyImage()

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

◆ MogrifyImageCommand()

WandExport MagickBooleanType MogrifyImageCommand ( ImageInfo *  image_info,
int  argc,
char **  argv,
char **  wand_unusedmetadata,
ExceptionInfo *  exception 
)

◆ MogrifyImageInfo()

◆ MogrifyImageList()

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

Definition at line 7888 of file mogrify.c.

References MagickPathExtent, MogrifyImageInfo(), and ThrowWandFatalException.

Referenced by MogrifyImages().

◆ MogrifyImages()

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

Definition at line 9152 of file mogrify.c.

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

◆ MogrifyUsage()

static MagickBooleanType MogrifyUsage ( void  )
static

Definition at line 3556 of file mogrify.c.

Referenced by MogrifyImageCommand().

◆ MonitorProgress()

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

Definition at line 411 of file mogrify.c.

References MagickPathExtent.

Referenced by MogrifyImage(), and MogrifyImageInfo().

◆ SparseColorOption()

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

Definition at line 453 of file mogrify.c.

References MagickPathExtent.

Referenced by MogrifyImage().

Variable Documentation

◆ MogrifyAlphaColor

const char MogrifyAlphaColor[] = "#bdbdbd"
static

Definition at line 70 of file mogrify.c.

Referenced by MogrifyImageInfo().

◆ MogrifyBackgroundColor

const char MogrifyBackgroundColor[] = "#ffffff"
static

Definition at line 71 of file mogrify.c.

Referenced by MogrifyImageInfo().

◆ MogrifyBorderColor

const char MogrifyBorderColor[] = "#dfdfdf"
static

Definition at line 72 of file mogrify.c.

Referenced by MogrifyImage(), and MogrifyImageInfo().