MagickWand 7.1.0
Convert, Edit, Or Compose Bitmap Images
operation.c File Reference
#include "MagickWand/studio.h"
#include "MagickWand/MagickWand.h"
#include "MagickWand/magick-wand-private.h"
#include "MagickWand/mogrify.h"
#include "MagickWand/operation.h"
#include "MagickWand/wand.h"
#include "MagickWand/wandcli.h"
#include "MagickWand/wandcli-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 dependency graph for operation.c:

Go to the source code of this file.

Macros

#define USE_WAND_METHODS   1
 
#define MAX_STACK_DEPTH   32
 
#define UNDEFINED_COMPRESSION_QUALITY   0UL
 
#define DEFAULT_DISSIMILARITY_THRESHOLD   "0.31830988618379067154"
 
#define ReportGeometry(flags, info)
 
#define _image_info   (cli_wand->wand.image_info)
 
#define _image   (cli_wand->wand.images)
 
#define _exception   (cli_wand->wand.exception)
 
#define _draw_info   (cli_wand->draw_info)
 
#define _quantize_info   (cli_wand->quantize_info)
 
#define IfSetOption   (*option=='-')
 
#define ArgBoolean   IfSetOption ? MagickTrue : MagickFalse
 
#define ArgBooleanNot   IfSetOption ? MagickFalse : MagickTrue
 
#define ArgBooleanString   (IfSetOption?"true":"false")
 
#define ArgOption(def)   (IfSetOption?arg1:(const char *)(def))
 
#define _process_flags   (cli_wand->process_flags)
 
#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)
 
#define _image_info   (cli_wand->wand.image_info)
 
#define _image   (cli_wand->wand.images)
 
#define _exception   (cli_wand->wand.exception)
 
#define _draw_info   (cli_wand->draw_info)
 
#define _quantize_info   (cli_wand->quantize_info)
 
#define _process_flags   (cli_wand->process_flags)
 
#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)
 
#define IfNormalOp   (*option=='-')
 
#define IfPlusOp   (*option!='-')
 
#define IsNormalOp   IfNormalOp ? MagickTrue : MagickFalse
 
#define IsPlusOp   IfNormalOp ? MagickFalse : MagickTrue
 
#define _image_info   (cli_wand->wand.image_info)
 
#define _images   (cli_wand->wand.images)
 
#define _exception   (cli_wand->wand.exception)
 
#define _draw_info   (cli_wand->draw_info)
 
#define _quantize_info   (cli_wand->quantize_info)
 
#define _process_flags   (cli_wand->process_flags)
 
#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)
 
#define IfNormalOp   (*option=='-')
 
#define IfPlusOp   (*option!='-')
 
#define IsNormalOp   IfNormalOp ? MagickTrue : MagickFalse
 
#define _image_info   (cli_wand->wand.image_info)
 
#define _images   (cli_wand->wand.images)
 
#define _exception   (cli_wand->wand.exception)
 
#define _process_flags   (cli_wand->process_flags)
 
#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)
 
#define IfNormalOp   (*option=='-')
 
#define IfPlusOp   (*option!='-')
 

Functions

static MagickBooleanType MonitorProgress (const char *text, const MagickOffsetType offset, const MagickSizeType extent, void *wand_unused(client_data))
 
static Image * GetImageCache (const ImageInfo *image_info, const char *path, ExceptionInfo *exception)
 
static Image * SparseColorOption (const Image *image, const SparseColorMethod method, const char *arguments, ExceptionInfo *exception)
 
WandPrivate void CLISettingOptionInfo (MagickCLI *cli_wand, const char *option, const char *arg1n, const char *arg2n)
 
static MagickBooleanType CLISimpleOperatorImage (MagickCLI *cli_wand, const char *option, const char *arg1n, const char *arg2n, ExceptionInfo *exception)
 
WandPrivate MagickBooleanType CLISimpleOperatorImages (MagickCLI *cli_wand, const char *option, const char *arg1, const char *arg2, ExceptionInfo *exception)
 
WandPrivate MagickBooleanType CLIListOperatorImages (MagickCLI *cli_wand, const char *option, const char *arg1n, const char *arg2n)
 
WandPrivate void CLINoImageOperator (MagickCLI *cli_wand, const char *option, const char *arg1n, const char *arg2n)
 
WandExport void CLIOption (MagickCLI *cli_wand, const char *option,...)
 

Variables

static const char MogrifyAlphaColor [] = "#bdbdbd"
 
static const char MogrifyBackgroundColor [] = "#fff"
 
static const char MogrifyBorderColor [] = "#dfdfdf"
 

Macro Definition Documentation

◆ _draw_info [1/3]

#define _draw_info   (cli_wand->draw_info)

◆ _draw_info [2/3]

#define _draw_info   (cli_wand->draw_info)

◆ _draw_info [3/3]

#define _draw_info   (cli_wand->draw_info)

◆ _exception [1/4]

#define _exception   (cli_wand->wand.exception)

◆ _exception [2/4]

#define _exception   (cli_wand->wand.exception)

◆ _exception [3/4]

#define _exception   (cli_wand->wand.exception)

◆ _exception [4/4]

#define _exception   (cli_wand->wand.exception)

◆ _image [1/2]

#define _image   (cli_wand->wand.images)

◆ _image [2/2]

#define _image   (cli_wand->wand.images)

◆ _image_info [1/4]

#define _image_info   (cli_wand->wand.image_info)

◆ _image_info [2/4]

#define _image_info   (cli_wand->wand.image_info)

◆ _image_info [3/4]

#define _image_info   (cli_wand->wand.image_info)

◆ _image_info [4/4]

#define _image_info   (cli_wand->wand.image_info)

◆ _images [1/2]

#define _images   (cli_wand->wand.images)

◆ _images [2/2]

#define _images   (cli_wand->wand.images)

◆ _option_type [1/4]

#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)

◆ _option_type [2/4]

#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)

◆ _option_type [3/4]

#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)

◆ _option_type [4/4]

#define _option_type   ((CommandOptionFlags) cli_wand->command->flags)

◆ _process_flags [1/4]

#define _process_flags   (cli_wand->process_flags)

◆ _process_flags [2/4]

#define _process_flags   (cli_wand->process_flags)

◆ _process_flags [3/4]

#define _process_flags   (cli_wand->process_flags)

◆ _process_flags [4/4]

#define _process_flags   (cli_wand->process_flags)

◆ _quantize_info [1/3]

#define _quantize_info   (cli_wand->quantize_info)

◆ _quantize_info [2/3]

#define _quantize_info   (cli_wand->quantize_info)

◆ _quantize_info [3/3]

#define _quantize_info   (cli_wand->quantize_info)

◆ ArgBoolean

#define ArgBoolean   IfSetOption ? MagickTrue : MagickFalse

◆ ArgBooleanNot

#define ArgBooleanNot   IfSetOption ? MagickFalse : MagickTrue

◆ ArgBooleanString

#define ArgBooleanString   (IfSetOption?"true":"false")

◆ ArgOption

#define ArgOption (   def)    (IfSetOption?arg1:(const char *)(def))

◆ DEFAULT_DISSIMILARITY_THRESHOLD

#define DEFAULT_DISSIMILARITY_THRESHOLD   "0.31830988618379067154"

Definition at line 85 of file operation.c.

◆ IfNormalOp [1/3]

#define IfNormalOp   (*option=='-')

◆ IfNormalOp [2/3]

#define IfNormalOp   (*option=='-')

◆ IfNormalOp [3/3]

#define IfNormalOp   (*option=='-')

◆ IfPlusOp [1/3]

#define IfPlusOp   (*option!='-')

◆ IfPlusOp [2/3]

#define IfPlusOp   (*option!='-')

◆ IfPlusOp [3/3]

#define IfPlusOp   (*option!='-')

◆ IfSetOption

#define IfSetOption   (*option=='-')

◆ IsNormalOp [1/2]

#define IsNormalOp   IfNormalOp ? MagickTrue : MagickFalse

◆ IsNormalOp [2/2]

#define IsNormalOp   IfNormalOp ? MagickTrue : MagickFalse

◆ IsPlusOp

#define IsPlusOp   IfNormalOp ? MagickFalse : MagickTrue

◆ MAX_STACK_DEPTH

#define MAX_STACK_DEPTH   32

Definition at line 81 of file operation.c.

◆ ReportGeometry

#define ReportGeometry (   flags,
  info 
)
Value:
(void) FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n", \
flags, info.rho, info.sigma, info.xi, info.psi )

Definition at line 88 of file operation.c.

◆ UNDEFINED_COMPRESSION_QUALITY

#define UNDEFINED_COMPRESSION_QUALITY   0UL

Definition at line 82 of file operation.c.

◆ USE_WAND_METHODS

#define USE_WAND_METHODS   1

Definition at line 80 of file operation.c.

Function Documentation

◆ CLIListOperatorImages()

◆ CLINoImageOperator()

◆ CLIOption()

◆ CLISettingOptionInfo()

◆ CLISimpleOperatorImage()

◆ CLISimpleOperatorImages()

WandPrivate MagickBooleanType CLISimpleOperatorImages ( MagickCLI cli_wand,
const char *  option,
const char *  arg1,
const char *  arg2,
ExceptionInfo *  exception 
)

◆ GetImageCache()

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

Definition at line 141 of file operation.c.

References MagickPathExtent.

Referenced by CLISettingOptionInfo(), and CLISimpleOperatorImage().

◆ MonitorProgress()

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

Definition at line 95 of file operation.c.

References MagickPathExtent.

Referenced by CLISettingOptionInfo(), and CLISimpleOperatorImage().

◆ SparseColorOption()

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

Definition at line 182 of file operation.c.

References MagickPathExtent.

Referenced by CLISimpleOperatorImage().

Variable Documentation

◆ MogrifyAlphaColor

const char MogrifyAlphaColor[] = "#bdbdbd"
static

Definition at line 73 of file operation.c.

Referenced by CLISettingOptionInfo().

◆ MogrifyBackgroundColor

const char MogrifyBackgroundColor[] = "#fff"
static

Definition at line 74 of file operation.c.

Referenced by CLISettingOptionInfo().

◆ MogrifyBorderColor

const char MogrifyBorderColor[] = "#dfdfdf"
static

Definition at line 75 of file operation.c.

Referenced by CLISettingOptionInfo().