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

Go to the source code of this file.

Defines

#define DefaultDissimilarityThreshold   0.31830988618379067154
#define DestroyCompare()
#define ThrowCompareException(asperity, tag, option)
#define ThrowCompareInvalidArgumentException(option, argument)

Functions

static MagickBooleanType CompareUsage (void)
WandExport MagickBooleanType CompareImagesCommand (ImageInfo *image_info, int argc, char **argv, char **metadata, ExceptionInfo *exception)

Define Documentation

#define DefaultDissimilarityThreshold   0.31830988618379067154

Referenced by CompareImagesCommand().

#define DestroyCompare ( )
Value:
{ \
  if (similarity_image != (Image *) NULL) \
    similarity_image=DestroyImageList(similarity_image); \
  if (difference_image != (Image *) NULL) \
    difference_image=DestroyImageList(difference_image); \
  DestroyImageStack(); \
  for (i=0; i < (ssize_t) argc; i++) \
    argv[i]=DestroyString(argv[i]); \
  argv=(char **) RelinquishMagickMemory(argv); \
}

Referenced by CompareImagesCommand().

#define ThrowCompareException (   asperity,
  tag,
  option 
)
Value:
{ \
  if (exception->severity < (asperity)) \
    (void) ThrowMagickException(exception,GetMagickModule(),asperity,tag, \
      "`%s'",option); \
  DestroyCompare(); \
  return(MagickFalse); \
}

Referenced by CompareImagesCommand().

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

Referenced by CompareImagesCommand().


Function Documentation

WandExport MagickBooleanType CompareImagesCommand ( ImageInfo *  image_info,
int  argc,
char **  argv,
char **  metadata,
ExceptionInfo *  exception 
)
static MagickBooleanType CompareUsage ( void  ) [static]

Definition at line 83 of file compare.c.

Referenced by CompareImagesCommand().