#include "magick/studio.h"#include "magick/artifact.h"#include "magick/cache.h"#include "magick/cache-view.h"#include "magick/colorspace-private.h"#include "magick/composite-private.h"#include "magick/distort.h"#include "magick/exception.h"#include "magick/exception-private.h"#include "magick/gem.h"#include "magick/hashmap.h"#include "magick/image.h"#include "magick/list.h"#include "magick/matrix.h"#include "magick/memory_.h"#include "magick/monitor-private.h"#include "magick/pixel.h"#include "magick/pixel-private.h"#include "magick/resample.h"#include "magick/resample-private.h"#include "magick/registry.h"#include "magick/semaphore.h"#include "magick/string_.h"#include "magick/string-private.h"#include "magick/thread-private.h"#include "magick/token.h"
Go to the source code of this file.
Defines | |
| #define | DistortImageTag "Distort/Image" |
| #define | InitalBounds(p) |
| #define | ExpandBounds(p) |
| #define | ScaleFilter(F, A, B, C, D) |
| #define | SparseColorTag "Distort/SparseColor" |
Functions | |
| static double | MagickMin (const double x, const double y) |
| static double | MagickMax (const double x, const double y) |
| static void | AffineArgsToCoefficients (double *affine) |
| static void | CoefficientsToAffineArgs (double *coeff) |
| static void | InvertAffineCoefficients (const double *coeff, double *inverse) |
| static void | InvertPerspectiveCoefficients (const double *coeff, double *inverse) |
| static double | MagickRound (double x) |
| static unsigned long | poly_number_terms (double order) |
| static double | poly_basis_fn (long n, double x, double y) |
| static const char * | poly_basis_str (long n) |
| static double | poly_basis_dx (long n, double x, double y) |
| static double | poly_basis_dy (long n, double x, double y) |
| static double * | GenerateCoefficients (const Image *image, DistortImageMethod *method, const unsigned long number_arguments, const double *arguments, unsigned long number_values, ExceptionInfo *exception) |
| MagickExport Image * | DistortImage (const Image *image, DistortImageMethod method, const unsigned long number_arguments, const double *arguments, MagickBooleanType bestfit, ExceptionInfo *exception) |
| MagickExport Image * | SparseColorImage (const Image *image, const ChannelType channel, const SparseColorMethod method, const unsigned long number_arguments, const double *arguments, ExceptionInfo *exception) |
| #define DistortImageTag "Distort/Image" |
Referenced by DistortImage().
| #define ExpandBounds | ( | p | ) |
{ \
/* printf("%lg,%lg -> %lg,%lg\n", s.x,s.y, d.x,d.y); */ \
min.x = MagickMin(min.x,p.x); \
max.x = MagickMax(max.x,p.x); \
min.y = MagickMin(min.y,p.y); \
max.y = MagickMax(max.y,p.y); \
}
Referenced by DistortImage().
| #define InitalBounds | ( | p | ) |
{ \
/* printf("%lg,%lg -> %lg,%lg\n", s.x,s.y, d.x,d.y); */ \
min.x = max.x = p.x; \
min.y = max.y = p.y; \
}
Referenced by DistortImage().
| #define ScaleFilter | ( | F, | |||
| A, | |||||
| B, | |||||
| C, | |||||
| D | ) |
ScaleResampleFilter( (F), \ output_scaling*(A), output_scaling*(B), \ output_scaling*(C), output_scaling*(D) )
Referenced by DistortImage().
| #define SparseColorTag "Distort/SparseColor" |
Referenced by SparseColorImage().
| static void AffineArgsToCoefficients | ( | double * | affine | ) | [inline, static] |
Definition at line 82 of file distort.c.
Referenced by GenerateCoefficients().
| static void CoefficientsToAffineArgs | ( | double * | coeff | ) | [inline, static] |
Definition at line 90 of file distort.c.
Referenced by DistortImage().
| MagickExport Image* DistortImage | ( | const Image * | image, | |
| DistortImageMethod | method, | |||
| const unsigned long | number_arguments, | |||
| const double * | arguments, | |||
| MagickBooleanType | bestfit, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 1399 of file distort.c.
References AcquireCacheView(), AcquireQuantumMemory(), AcquireResampleFilterThreadSet(), AffineDistortion, ArcDistortion, _Image::background_color, BarrelDistortion, BarrelInverseDistortion, BilinearForwardDistortion, BilinearReverseDistortion, CloneImage(), CMYKColorspace, CoefficientsToAffineArgs(), _Image::colorspace, _Image::columns, ConvertRGBToCMYK(), _Image::debug, DePolarDistortion, DestroyCacheView(), DestroyImage(), DestroyResampleFilterThreadSet(), DirectClass, DistortImageTag, _Image::exception, ExpandBounds, _Image::filename, FormatMagickString(), GenerateCoefficients(), GetCacheViewAuthenticIndexQueue(), GetImageArtifact(), GetMagickModule, GetMagickPixelPacket(), GetOpenMPThreadId(), _RectangleInfo::height, hypot, InheritException(), InitalBounds, InvertAffineCoefficients(), InvertPerspectiveCoefficients(), LogMagickEvent(), Magick2PI, MagickEpsilon, MagickFalse, MagickPI2, MagickPixelCompositeBlend(), MagickRound(), MagickSignature, MagickTrue, _Image::matte, _Image::matte_color, MaxTextExtent, _PixelPacket::opacity, OpaqueOpacity, OptionError, _Image::page, ParseAbsoluteGeometry(), PerspectiveDistortion, PolarDistortion, poly_basis_dx(), poly_basis_dy(), poly_basis_fn(), poly_basis_str(), PolynomialDistortion, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), RelinquishMagickMemory(), ResamplePixelColor(), ResourceLimitError, restrict, _Image::rows, ScaleFilter, SetImageProgress(), SetImageStorageClass(), SetMagickPixelPacket(), SetPixelPacket(), ShepardsDistortion, _ExceptionInfo::signature, _Image::signature, StringToDouble(), SyncCacheViewAuthenticPixels(), ThrowMagickException(), TraceEvent, UndefinedVirtualPixelMethod, _RectangleInfo::width, _PointInfo::x, _RectangleInfo::x, _PointInfo::y, and _RectangleInfo::y.
Referenced by AffineTransformImage().
| static double* GenerateCoefficients | ( | const Image * | image, | |
| DistortImageMethod * | method, | |||
| const unsigned long | number_arguments, | |||
| const double * | arguments, | |||
| unsigned long | number_values, | |||
| ExceptionInfo * | exception | |||
| ) | [static] |
Definition at line 315 of file distort.c.
References AcquireMagickMatrix(), AcquireQuantumMemory(), AffineArgsToCoefficients(), AffineDistortion, AffineProjectionDistortion, ArcDistortion, BarrelDistortion, BarrelInverseDistortion, BilinearForwardDistortion, BilinearReverseDistortion, _Image::columns, DegreesToRadians(), DePolarDistortion, GaussJordanElimination(), GetMagickModule, InvertAffineCoefficients(), InvertPerspectiveCoefficients(), LeastSquaresAddTerms(), Magick2PI, MagickEpsilon, MagickFalse, MagickMax(), MagickMin(), MagickPI, MagickPI2, MagickRound(), OptionError, _Image::page, PerspectiveDistortion, PerspectiveProjectionDistortion, PolarDistortion, poly_basis_fn(), poly_number_terms(), PolynomialDistortion, RelinquishMagickMatrix(), RelinquishMagickMemory(), ResourceLimitError, _Image::rows, ScaleRotateTranslateDistortion, ShepardsDistortion, ThrowMagickException(), UndefinedDistortion, VoronoiColorInterpolate, _RectangleInfo::x, and _RectangleInfo::y.
Referenced by DistortImage(), and SparseColorImage().
| static void InvertAffineCoefficients | ( | const double * | coeff, | |
| double * | inverse | |||
| ) | [static] |
Definition at line 97 of file distort.c.
Referenced by DistortImage(), and GenerateCoefficients().
| static void InvertPerspectiveCoefficients | ( | const double * | coeff, | |
| double * | inverse | |||
| ) | [static] |
Definition at line 111 of file distort.c.
Referenced by DistortImage(), and GenerateCoefficients().
| static double MagickMax | ( | const double | x, | |
| const double | y | |||
| ) | [inline, static] |
Definition at line 77 of file distort.c.
Referenced by GenerateCoefficients().
| static double MagickMin | ( | const double | x, | |
| const double | y | |||
| ) | [inline, static] |
Definition at line 73 of file distort.c.
Referenced by GenerateCoefficients().
| static double MagickRound | ( | double | x | ) | [inline, static] |
Definition at line 128 of file distort.c.
Referenced by DistortImage(), and GenerateCoefficients().
| static double poly_basis_dx | ( | long | n, | |
| double | x, | |||
| double | y | |||
| ) | [static] |
Definition at line 220 of file distort.c.
Referenced by DistortImage(), and poly_basis_dy().
| static double poly_basis_dy | ( | long | n, | |
| double | x, | |||
| double | y | |||
| ) | [static] |
| static double poly_basis_fn | ( | long | n, | |
| double | x, | |||
| double | y | |||
| ) | [static] |
Definition at line 164 of file distort.c.
Referenced by DistortImage(), and GenerateCoefficients().
| static const char* poly_basis_str | ( | long | n | ) | [static] |
Definition at line 192 of file distort.c.
Referenced by DistortImage().
| static unsigned long poly_number_terms | ( | double | order | ) | [static] |
Definition at line 155 of file distort.c.
References MagickEpsilon.
Referenced by GenerateCoefficients().
| MagickExport Image* SparseColorImage | ( | const Image * | image, | |
| const ChannelType | channel, | |||
| const SparseColorMethod | method, | |||
| const unsigned long | number_arguments, | |||
| const double * | arguments, | |||
| ExceptionInfo * | exception | |||
| ) |
Definition at line 2380 of file distort.c.
References AcquireCacheView(), BarycentricColorInterpolate, BilinearColorInterpolate, _MagickPixelPacket::blue, BlueChannel, CloneImage(), _Image::columns, _Image::debug, DestroyCacheView(), DestroyImage(), DirectClass, _Image::exception, _Image::filename, GenerateCoefficients(), GetCacheViewAuthenticIndexQueue(), GetImageArtifact(), GetMagickModule, GetMagickPixelPacket(), _MagickPixelPacket::green, GreenChannel, _MagickPixelPacket::index, IndexChannel, InheritException(), LogMagickEvent(), MagickFalse, MagickHuge, MagickSignature, MagickTrue, _MagickPixelPacket::opacity, OpacityChannel, _Image::progress_monitor, QuantumRange, QueueCacheViewAuthenticPixels(), _MagickPixelPacket::red, RedChannel, RelinquishMagickMemory(), restrict, _Image::rows, SetImageProgress(), SetImageStorageClass(), SetPixelPacket(), ShepardsColorInterpolate, _ExceptionInfo::signature, _Image::signature, SparseColorTag, SyncCacheViewAuthenticPixels(), TraceEvent, and VoronoiColorInterpolate.
1.6.2-20100208