#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 FxInfo * | AcquireFxInfo (const Image *images, const char *expression, ExceptionInfo *exception) |
MagickPrivate FxInfo * | DestroyFxInfo (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 Image * | FxImage (const Image *image, const char *expression, ExceptionInfo *exception) |
#define FxMaxParenthesisDepth 58 |
Referenced by FxEvaluateSubexpression().
#define FxMaxSubexpressionDepth 200 |
Referenced by FxEvaluateSubexpression().
#define FxParseConditional | ( | subexpression, | |||
sentinal, | |||||
p, | |||||
q | ) |
{ \ 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 | ) |
{ \ subexpression=DestroyString(subexpression); \ return(value); \ }
Referenced by FxEvaluateSubexpression().
enum FxOperator |
MagickPrivate FxInfo* AcquireFxInfo | ( | const Image * | images, | |
const char * | expression, | |||
ExceptionInfo * | exception | |||
) |
References AcquireCriticalMemory(), AcquireExceptionInfo(), AcquireQuantumMemory(), AcquireRandomInfo(), AcquireVirtualCacheView(), BitwiseAndAssignmentOperator, BitwiseOrAssignmentOperator, _FxInfo::colors, CompareSplayTreeString(), ConstantString(), DecrementAssignmentOperator, DivideAssignmentOperator, EqualOperator, _FxInfo::exception, ExponentialNotation, _FxInfo::expression, _FxInfo::file, GetFirstImageInList(), GetImageListLength(), GreaterThanEqualOperator, _FxInfo::images, IncrementAssignmentOperator, LeftShiftAssignmentOperator, LeftShiftOperator, LessThanEqualOperator, LogicalAndOperator, LogicalOrOperator, ModuloAssignmentOperator, MultiplyAssignmentOperator, NewSplayTree(), _Image::next, NotEqualOperator, PlusAssignmentOperator, PowerAssignmentOperator, _FxInfo::random_info, RelinquishMagickMemory(), ResourceLimitFatalError, RightShiftAssignmentOperator, RightShiftOperator, SubstituteString(), SubtractAssignmentOperator, _FxInfo::symbols, ThrowFatalException, and _FxInfo::view.
static FxInfo** AcquireFxThreadSet | ( | const Image * | image, | |
const char * | expression, | |||
ExceptionInfo * | exception | |||
) | [static] |
References AcquireFxInfo(), AcquireQuantumMemory(), ConstantString(), DestroyFxThreadSet(), DestroyString(), _Image::filename, FileToString(), FxPreprocessExpression(), GetMagickModule, GetMagickResourceLimit(), MagickFalse, ResourceLimitError, ThreadResource, and ThrowMagickException().
Referenced by FxImage().
References _FxInfo::colors, DestroyCacheView(), DestroyExceptionInfo(), DestroyRandomInfo(), DestroySplayTree(), DestroyString(), _FxInfo::exception, _FxInfo::expression, GetImageListLength(), _FxInfo::images, _FxInfo::random_info, RelinquishMagickMemory(), _FxInfo::symbols, and _FxInfo::view.
Referenced by DestroyFxThreadSet(), and InterpretImageProperties().
References DestroyFxInfo(), GetMagickResourceLimit(), RelinquishMagickMemory(), and ThreadResource.
Referenced by AcquireFxThreadSet(), and FxImage().
static double FxChannelStatistics | ( | FxInfo * | fx_info, | |
Image * | image, | |||
PixelChannel | channel, | |||
const char * | symbol, | |||
ExceptionInfo * | exception | |||
) | [static] |
References FormatLocaleString(), GetFxSymbolValue(), GetImageDepth(), GetImageKurtosis(), GetImageMean(), GetImageRange(), LocaleNCompare(), MagickFalse, MagickPathExtent, MagickPixelChannelOptions, MagickTrue, ParseCommandOption(), QuantumScale, SetFxSymbolValue(), SetPixelChannelMask(), and UndefinedChannel.
Referenced by FxGetSymbol().
MagickPrivate MagickBooleanType FxEvaluateChannelExpression | ( | FxInfo * | fx_info, | |
const PixelChannel | channel, | |||
const ssize_t | x, | |||
const ssize_t | y, | |||
double * | alpha, | |||
ExceptionInfo * | exception | |||
) |
References _FxInfo::expression, FxEvaluateSubexpression(), MagickFalse, MagickTrue, OptionError, and _ExceptionInfo::severity.
Referenced by FxEvaluateExpression(), FxImage(), FxPreprocessExpression(), and InterpretImageProperties().
MagickPrivate MagickBooleanType FxEvaluateExpression | ( | FxInfo * | fx_info, | |
double * | alpha, | |||
ExceptionInfo * | exception | |||
) |
References FxEvaluateChannelExpression(), and GrayPixelChannel.
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] |
References AcquireString(), AlphaPixelChannel, BitwiseAndAssignmentOperator, BitwiseOrAssignmentOperator, BlackPixelChannel, BluePixelChannel, ClearMagickException(), CMYKColorspace, _Image::colorspace, CopyMagickString(), CyanPixelChannel, DecrementAssignmentOperator, DestroyString(), DivideAssignmentOperator, EqualOperator, ErrorException, ExponentialNotation, _FxInfo::file, _Image::filename, FormatLocaleFile(), FxGCD(), FxGetSymbol(), FxMaxParenthesisDepth, FxMaxSubexpressionDepth, FxOperatorPrecedence(), FxParseConditional, FxReturn, GetMagickModule, GetMagickPrecision(), GetPseudoRandomValue(), GRAYColorspace, GreaterThanEqualOperator, GreenPixelChannel, _FxInfo::images, IncrementAssignmentOperator, InterpretSiPrefixValue(), IsFxFunction(), IsNaN, LeftShiftAssignmentOperator, LeftShiftOperator, LessThanEqualOperator, LocaleCompare(), LocaleNCompare(), LogicalAndOperator, LogicalOrOperator, MagentaPixelChannel, MagickEpsilon, MagickFalse, MagickPathExtent, MagickPHI, MagickPI, ModuloAssignmentOperator, MultiplyAssignmentOperator, NotEqualOperator, OptionError, PerceptibleReciprocal(), PlusAssignmentOperator, PowerAssignmentOperator, QuantumRange, QuantumScale, _FxInfo::random_info, RedPixelChannel, RightShiftAssignmentOperator, RightShiftOperator, SetFxSymbolValue(), _ExceptionInfo::severity, SubtractAssignmentOperator, ThrowMagickException(), and YellowPixelChannel.
Referenced by FxEvaluateChannelExpression(), and FxGetSymbol().
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 | |||
) |
References AcquireAuthenticCacheView(), AcquireFxThreadSet(), AcquireVirtualCacheView(), ClampToQuantum(), CloneImage(), _Image::columns, CopyPixelTrait, _Image::debug, DestroyCacheView(), DestroyFxThreadSet(), DestroyImage(), DirectClass, _Image::filename, FxEvaluateChannelExpression(), FxImageTag, GetCacheViewVirtualPixels(), GetMagickModule, GetOpenMPThreadId(), GetPixelChannelChannel(), GetPixelChannels(), GetPixelChannelTraits(), LogMagickEvent(), magick_restrict, MagickCoreSignature, MagickFalse, MagickTrue, _Image::progress_monitor, QuantumRange, QueueCacheViewAuthenticPixels(), _Image::rows, SetImageProgress(), SetImageStorageClass(), SetPixelChannel(), _Image::signature, SyncCacheViewAuthenticPixels(), TraceEvent, and UndefinedPixelTrait.
static const char* FxOperatorPrecedence | ( | const char * | expression, | |
ExceptionInfo * | exception | |||
) | [static] |
References BitwiseAndAssignmentOperator, BitwiseOrAssignmentOperator, DecrementAssignmentOperator, DivideAssignmentOperator, EqualOperator, ExponentialNotation, FxSubexpression(), GreaterThanEqualOperator, IncrementAssignmentOperator, IsFxFunction(), LeftShiftAssignmentOperator, LeftShiftOperator, LessThanEqualOperator, LocaleNCompare(), LogicalAndOperator, LogicalOrOperator, MagickFalse, ModuloAssignmentOperator, MultiplyAssignmentOperator, NotEqualOperator, PlusAssignmentOperator, PowerAssignmentOperator, RightShiftAssignmentOperator, RightShiftOperator, and SubtractAssignmentOperator.
Referenced by FxEvaluateSubexpression().
MagickExport MagickBooleanType FxPreprocessExpression | ( | FxInfo * | fx_info, | |
double * | alpha, | |||
ExceptionInfo * | exception | |||
) |
References _FxInfo::file, FxEvaluateChannelExpression(), and GrayPixelChannel.
Referenced by AcquireFxThreadSet().
static const char* FxSubexpression | ( | const char * | expression, | |
ExceptionInfo * | exception | |||
) | [inline, static] |
References GetMagickModule, OptionError, and ThrowMagickException().
Referenced by FxOperatorPrecedence().
static const double* GetFxSymbolValue | ( | FxInfo *magick_restrict | fx_info, | |
const char * | symbol | |||
) | [inline, static] |
References GetValueFromSplayTree().
Referenced by FxChannelStatistics(), and FxGetSymbol().
static MagickBooleanType IsFxFunction | ( | const char * | expression, | |
const char * | name, | |||
const size_t | length | |||
) | [inline, static] |
References LocaleNCompare(), MagickFalse, and MagickTrue.
Referenced by FxEvaluateSubexpression(), FxGetSymbol(), and FxOperatorPrecedence().
static MagickBooleanType SetFxSymbolValue | ( | FxInfo *magick_restrict | fx_info, | |
const char *magick_restrict | symbol, | |||
double const | value | |||
) | [inline, static] |
References AcquireQuantumMemory(), AddValueToSplayTree(), ConstantString(), GetMagickModule, GetValueFromSplayTree(), MagickFalse, MagickTrue, ResourceLimitError, and ThrowMagickException().
Referenced by FxChannelStatistics(), FxEvaluateSubexpression(), and FxGetSymbol().