fx.c File Reference

#include "MagickCore/studio.h"
#include "MagickCore/accelerate-private.h"
#include "MagickCore/annotate.h"
#include "MagickCore/artifact.h"
#include "MagickCore/attribute.h"
#include "MagickCore/cache.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/channel.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace-private.h"
#include "MagickCore/composite.h"
#include "MagickCore/decorate.h"
#include "MagickCore/distort.h"
#include "MagickCore/draw.h"
#include "MagickCore/effect.h"
#include "MagickCore/enhance.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/fx.h"
#include "MagickCore/fx-private.h"
#include "MagickCore/gem.h"
#include "MagickCore/gem-private.h"
#include "MagickCore/geometry.h"
#include "MagickCore/layer.h"
#include "MagickCore/list.h"
#include "MagickCore/log.h"
#include "MagickCore/image.h"
#include "MagickCore/image-private.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
#include "MagickCore/pixel.h"
#include "MagickCore/pixel-accessor.h"
#include "MagickCore/property.h"
#include "MagickCore/quantum.h"
#include "MagickCore/quantum-private.h"
#include "MagickCore/random_.h"
#include "MagickCore/random-private.h"
#include "MagickCore/resample.h"
#include "MagickCore/resample-private.h"
#include "MagickCore/resize.h"
#include "MagickCore/resource_.h"
#include "MagickCore/splay-tree.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/threshold.h"
#include "MagickCore/transform.h"
#include "MagickCore/transform-private.h"
#include "MagickCore/utility.h"

Data Structures

struct  _FxInfo

Defines

#define FxMaxParenthesisDepth   58
#define FxMaxSubexpressionDepth   200
#define FxReturn(value)
#define FxParseConditional(subexpression, sentinal, p, q)
#define FxImageTag   "Fx/Image"

Enumerations

enum  FxOperator {
  BitwiseAndAssignmentOperator = 0xd9U, BitwiseOrAssignmentOperator, LeftShiftAssignmentOperator, RightShiftAssignmentOperator,
  PowerAssignmentOperator, ModuloAssignmentOperator, PlusAssignmentOperator, SubtractAssignmentOperator,
  MultiplyAssignmentOperator, DivideAssignmentOperator, IncrementAssignmentOperator, DecrementAssignmentOperator,
  LeftShiftOperator, RightShiftOperator, LessThanEqualOperator, GreaterThanEqualOperator,
  EqualOperator, NotEqualOperator, LogicalAndOperator, LogicalOrOperator,
  ExponentialNotation
}

Functions

MagickPrivate FxInfoAcquireFxInfo (const Image *images, const char *expression, ExceptionInfo *exception)
MagickPrivate FxInfoDestroyFxInfo (FxInfo *fx_info)
static const double * GetFxSymbolValue (FxInfo *magick_restrict fx_info, const char *symbol)
static MagickBooleanType SetFxSymbolValue (FxInfo *magick_restrict fx_info, const char *magick_restrict symbol, double const value)
static double FxChannelStatistics (FxInfo *fx_info, Image *image, PixelChannel channel, const char *symbol, ExceptionInfo *exception)
static double FxEvaluateSubexpression (FxInfo *, const PixelChannel, const ssize_t, const ssize_t, const char *, const size_t, double *, ExceptionInfo *)
static MagickBooleanType IsFxFunction (const char *expression, const char *name, const size_t length)
static MagickOffsetType FxGCD (MagickOffsetType alpha, MagickOffsetType beta)
static const char * FxSubexpression (const char *expression, ExceptionInfo *exception)
static double FxGetSymbol (FxInfo *fx_info, const PixelChannel channel, const ssize_t x, const ssize_t y, const char *expression, const size_t depth, ExceptionInfo *exception)
static const char * FxOperatorPrecedence (const char *expression, ExceptionInfo *exception)
MagickPrivate MagickBooleanType FxEvaluateExpression (FxInfo *fx_info, double *alpha, ExceptionInfo *exception)
MagickExport MagickBooleanType FxPreprocessExpression (FxInfo *fx_info, double *alpha, ExceptionInfo *exception)
MagickPrivate MagickBooleanType FxEvaluateChannelExpression (FxInfo *fx_info, const PixelChannel channel, const ssize_t x, const ssize_t y, double *alpha, ExceptionInfo *exception)
static FxInfo ** DestroyFxThreadSet (FxInfo **fx_info)
static FxInfo ** AcquireFxThreadSet (const Image *image, const char *expression, ExceptionInfo *exception)
MagickExport ImageFxImage (const Image *image, const char *expression, ExceptionInfo *exception)

Define Documentation

#define FxImageTag   "Fx/Image"

Referenced by FxImage().

#define FxMaxParenthesisDepth   58

Referenced by FxEvaluateSubexpression().

#define FxMaxSubexpressionDepth   200

Referenced by FxEvaluateSubexpression().

#define FxParseConditional ( subexpression,
sentinal,
p,
 ) 
Value:
{ \
  p=subexpression; \
  for (q=(char *) p; (*q != (sentinal)) && (*q != '\0'); q++) \
    if (*q == '(') \
      { \
        for (q++; (*q != ')') && (*q != '\0'); q++); \
        if (*q == '\0') \
          break; \
      } \
  if (*q == '\0') \
    { \
      (void) ThrowMagickException(exception,GetMagickModule(), \
        OptionError,"UnableToParseExpression","`%s'",subexpression); \
      FxReturn(0.0); \
    } \
  if (strlen(q) == 1) \
    *(q+1)='\0'; \
  *q='\0'; \
}

Referenced by FxEvaluateSubexpression().

#define FxReturn ( value   ) 
Value:
{ \
  subexpression=DestroyString(subexpression); \
  return(value); \
}

Referenced by FxEvaluateSubexpression().


Enumeration Type Documentation

enum FxOperator
Enumerator:
BitwiseAndAssignmentOperator 
BitwiseOrAssignmentOperator 
LeftShiftAssignmentOperator 
RightShiftAssignmentOperator 
PowerAssignmentOperator 
ModuloAssignmentOperator 
PlusAssignmentOperator 
SubtractAssignmentOperator 
MultiplyAssignmentOperator 
DivideAssignmentOperator 
IncrementAssignmentOperator 
DecrementAssignmentOperator 
LeftShiftOperator 
RightShiftOperator 
LessThanEqualOperator 
GreaterThanEqualOperator 
EqualOperator 
NotEqualOperator 
LogicalAndOperator 
LogicalOrOperator 
ExponentialNotation 

Function Documentation

MagickPrivate FxInfo* AcquireFxInfo ( const Image images,
const char *  expression,
ExceptionInfo exception 
)
static FxInfo** AcquireFxThreadSet ( const Image image,
const char *  expression,
ExceptionInfo exception 
) [static]
MagickPrivate FxInfo* DestroyFxInfo ( FxInfo fx_info  ) 
static FxInfo** DestroyFxThreadSet ( FxInfo **  fx_info  )  [static]
static double FxChannelStatistics ( FxInfo fx_info,
Image image,
PixelChannel  channel,
const char *  symbol,
ExceptionInfo exception 
) [static]
MagickPrivate MagickBooleanType FxEvaluateChannelExpression ( FxInfo fx_info,
const PixelChannel  channel,
const ssize_t  x,
const ssize_t  y,
double *  alpha,
ExceptionInfo exception 
)
MagickPrivate MagickBooleanType FxEvaluateExpression ( FxInfo fx_info,
double *  alpha,
ExceptionInfo exception 
)
static double FxEvaluateSubexpression ( FxInfo fx_info,
const PixelChannel  channel,
const ssize_t  x,
const ssize_t  y,
const char *  expression,
const size_t  depth,
double *  beta,
ExceptionInfo exception 
) [static]
static MagickOffsetType FxGCD ( MagickOffsetType  alpha,
MagickOffsetType  beta 
) [static]

Referenced by FxEvaluateSubexpression().

static double FxGetSymbol ( FxInfo fx_info,
const PixelChannel  channel,
const ssize_t  x,
const ssize_t  y,
const char *  expression,
const size_t  depth,
ExceptionInfo exception 
) [static]

References AcquireString(), AddValueToSplayTree(), AllCompliance, _PixelInfo::alpha, _PixelInfo::alpha_trait, AlphaPixelChannel, _PixelInfo::black, BlackPixelChannel, _PixelInfo::blue, BluePixelChannel, _GeometryInfo::chi, ChiValue, ClonePixelInfo(), CMYKColorspace, _FxInfo::colors, _Image::colorspace, _Image::columns, CompositePixelChannel, ConstantString(), ConvertRGBToHSL(), CopyMagickString(), CyanPixelChannel, DestroyString(), _FxInfo::exception, _Image::extent, _Image::filename, FxChannelStatistics(), FxEvaluateSubexpression(), GetBlobSize(), GetFxSymbolValue(), GetImageDepth(), GetImageFromList(), GetImageIndexInList(), GetImageListLength(), GetMagickModule, GetPixelInfo(), GetPixelIntensity(), GetValueFromSplayTree(), _PixelInfo::green, GreenPixelChannel, _RectangleInfo::height, ImageError, _FxInfo::images, IndexPixelChannel, _Image::interpolate, InterpolatePixelInfo(), IsFxFunction(), LocaleCompare(), LocaleNCompare(), MagentaPixelChannel, MagickFalse, MagickPathExtent, MaxPixelChannels, OptionError, _Image::page, ParseGeometry(), PerceptibleReciprocal(), _GeometryInfo::psi, PsiValue, _Image::quality, QuantumScale, QueryColorCompliance(), _PixelInfo::red, RedPixelChannel, _Image::resolution, _GeometryInfo::rho, RhoValue, _Image::rows, SetFxSymbolValue(), SetPixelViaPixelInfo(), _GeometryInfo::sigma, SigmaValue, StripString(), ThrowMagickException(), UndefinedPixelTrait, _FxInfo::view, _RectangleInfo::width, _RectangleInfo::x, _PointInfo::x, _GeometryInfo::xi, XiValue, _RectangleInfo::y, _PointInfo::y, and YellowPixelChannel.

Referenced by FxEvaluateSubexpression().

MagickExport Image* FxImage ( const Image image,
const char *  expression,
ExceptionInfo exception 
)
static const char* FxOperatorPrecedence ( const char *  expression,
ExceptionInfo exception 
) [static]
MagickExport MagickBooleanType FxPreprocessExpression ( FxInfo fx_info,
double *  alpha,
ExceptionInfo exception 
)
static const char* FxSubexpression ( const char *  expression,
ExceptionInfo exception 
) [inline, static]
static const double* GetFxSymbolValue ( FxInfo *magick_restrict  fx_info,
const char *  symbol 
) [inline, static]
static MagickBooleanType IsFxFunction ( const char *  expression,
const char *  name,
const size_t  length 
) [inline, static]
static MagickBooleanType SetFxSymbolValue ( FxInfo *magick_restrict  fx_info,
const char *magick_restrict  symbol,
double const   value 
) [inline, static]

Generated on 6 Apr 2020 for MagickCore by  doxygen 1.6.1