|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/artifact.h"#include "MagickCore/cache.h"#include "MagickCore/cache-view.h"#include "MagickCore/colorspace-private.h"#include "MagickCore/composite-private.h"#include "MagickCore/distort.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/gem.h"#include "MagickCore/hashmap.h"#include "MagickCore/image.h"#include "MagickCore/list.h"#include "MagickCore/matrix.h"#include "MagickCore/matrix-private.h"#include "MagickCore/memory_.h"#include "MagickCore/monitor-private.h"#include "MagickCore/option.h"#include "MagickCore/pixel.h"#include "MagickCore/pixel-accessor.h"#include "MagickCore/resample.h"#include "MagickCore/resample-private.h"#include "MagickCore/registry.h"#include "MagickCore/semaphore.h"#include "MagickCore/shear.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/thread-private.h"#include "MagickCore/token.h"#include "MagickCore/transform.h"
Go to the source code of this file.
Defines | |
| #define | DistortResizeImageTag "Distort/Image" |
| #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 size_t | poly_number_terms (double order) |
| static double | poly_basis_fn (ssize_t n, double x, double y) |
| static const char * | poly_basis_str (ssize_t n) |
| static double | poly_basis_dx (ssize_t n, double x, double y) |
| static double | poly_basis_dy (ssize_t n, double x, double y) |
| MagickExport Image * | AffineTransformImage (const Image *image, const AffineMatrix *affine_matrix, ExceptionInfo *exception) |
| static double * | GenerateCoefficients (const Image *image, DistortImageMethod *method, const size_t number_arguments, const double *arguments, size_t number_values, ExceptionInfo *exception) |
| MagickExport Image * | DistortResizeImage (const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception) |
| MagickExport Image * | DistortImage (const Image *image, DistortImageMethod method, const size_t number_arguments, const double *arguments, MagickBooleanType bestfit, ExceptionInfo *exception) |
| MagickExport Image * | RotateImage (const Image *image, const double degrees, ExceptionInfo *exception) |
| MagickExport Image * | SparseColorImage (const Image *image, const SparseColorMethod method, const size_t number_arguments, const double *arguments, ExceptionInfo *exception) |
| #define DistortImageTag "Distort/Image" |
Referenced by DistortImage().
| #define DistortResizeImageTag "Distort/Image" |
| #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 86 of file distort.c.
Referenced by GenerateCoefficients().
| MagickExport Image* AffineTransformImage | ( | const Image * | image, |
| const AffineMatrix * | affine_matrix, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 300 of file distort.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, _AffineMatrix::sx, _AffineMatrix::rx, _AffineMatrix::ry, _AffineMatrix::sy, _AffineMatrix::tx, _AffineMatrix::ty, DistortImage(), AffineProjectionDistortion, and MagickTrue.
Referenced by DeskewImage().
| static void CoefficientsToAffineArgs | ( | double * | coeff | ) | [inline, static] |
Definition at line 94 of file distort.c.
Referenced by DistortImage().
| MagickExport Image* DistortImage | ( | const Image * | image, |
| DistortImageMethod | method, | ||
| const size_t | number_arguments, | ||
| const double * | arguments, | ||
| MagickBooleanType | bestfit, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1671 of file distort.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, ResizeDistortion, ThrowMagickException(), OptionError, DistortResizeImage(), GenerateCoefficients(), _RectangleInfo::width, _Image::columns, _RectangleInfo::height, _Image::rows, _RectangleInfo::x, _RectangleInfo::y, ArcDistortion, MagickTrue, _PointInfo::x, _PointInfo::y, AffineDistortion, InvertAffineCoefficients(), _Image::page, InitalBounds, ExpandBounds, PerspectiveDistortion, InvertPerspectiveCoefficients(), MagickEpsilon, MagickPI2, Magick2PI, PolarDistortion, DePolarDistortion, Cylinder2PlaneDistortion, Plane2CylinderDistortion, ShepardsDistortion, BilinearForwardDistortion, BilinearReverseDistortion, PolynomialDistortion, BarrelDistortion, BarrelInverseDistortion, GetImageArtifact(), ParseAbsoluteGeometry(), MaxTextExtent, FormatLocaleString(), AcquireQuantumMemory(), RelinquishMagickMemory(), ResourceLimitError, CoefficientsToAffineArgs(), FormatLocaleFile(), poly_basis_str(), StringToDouble(), CloneImage(), SetImageStorageClass(), DirectClass, DestroyImage(), _Image::background_color, _PixelInfo::alpha, OpaqueAlpha, _Image::matte, GetPixelInfo(), AcquireResampleFilterThreadSet(), UndefinedVirtualPixelMethod, AcquireCacheView(), GetOpenMPThreadId(), QueueCacheViewAuthenticPixels(), ScaleFilter, _Image::matte_color, _Image::colorspace, CMYKColorspace, ConvertRGBToCMYK(), BilinearDistortion, poly_basis_fn(), poly_basis_dx(), poly_basis_dy(), MagickRound(), MagickPI, SetPixelInfoPixel(), ResamplePixelColor(), CompositePixelInfoBlend(), GetPixelChannels(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), DistortImageTag, DestroyCacheView(), and DestroyResampleFilterThreadSet().
Referenced by AffineTransformImage(), DistortResizeImage(), and RotateImage().
| MagickExport Image* DistortResizeImage | ( | const Image * | image, |
| const size_t | columns, | ||
| const size_t | rows, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 1459 of file distort.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, SetImageVirtualPixelMethod(), TransparentVirtualPixelMethod, ResetMagickMemory(), _Image::columns, _Image::rows, GetImageVirtualPixelMethod(), CloneImage(), MagickTrue, _Image::matte, SetImageAlphaChannel(), SetAlphaChannel, DistortImage(), AffineDistortion, DestroyImage(), DeactivateAlphaChannel, ExtractAlphaChannel, OpaqueAlphaChannel, CompositeImage(), CopyAlphaCompositeOp, _RectangleInfo::width, _RectangleInfo::height, _RectangleInfo::x, _RectangleInfo::y, and CropImage().
Referenced by DistortImage().
| static double* GenerateCoefficients | ( | const Image * | image, |
| DistortImageMethod * | method, | ||
| const size_t | number_arguments, | ||
| const double * | arguments, | ||
| size_t | number_values, | ||
| ExceptionInfo * | exception | ||
| ) | [static] |
Definition at line 379 of file distort.c.
References BilinearForwardDistortion, BilinearReverseDistortion, PerspectiveDistortion, AffineDistortion, PolynomialDistortion, ThrowMagickException(), GetMagickModule, OptionError, poly_number_terms(), ShepardsDistortion, ArcDistortion, ScaleRotateTranslateDistortion, AffineProjectionDistortion, Plane2CylinderDistortion, Cylinder2PlaneDistortion, PolarDistortion, DePolarDistortion, PerspectiveProjectionDistortion, BarrelDistortion, BarrelInverseDistortion, AcquireQuantumMemory(), ResourceLimitError, RelinquishMagickMemory(), AcquireMagickMatrix(), RelinquishMagickMatrix(), LeastSquaresAddTerms(), GaussJordanElimination(), MagickFalse, CommandOptionToMnemonic(), MagickDistortOptions, AffineArgsToCoefficients(), InvertAffineCoefficients(), _Image::columns, _Image::page, _RectangleInfo::x, _Image::rows, _RectangleInfo::y, MagickEpsilon, DegreesToRadians(), InvertPerspectiveCoefficients(), poly_basis_fn(), MagickPI2, Magick2PI, MagickRound(), MagickPI, MagickMin(), and MagickMax().
Referenced by DistortImage(), and SparseColorImage().
| static void InvertAffineCoefficients | ( | const double * | coeff, |
| double * | inverse | ||
| ) | [static] |
Definition at line 101 of file distort.c.
Referenced by GenerateCoefficients(), and DistortImage().
| static void InvertPerspectiveCoefficients | ( | const double * | coeff, |
| double * | inverse | ||
| ) | [static] |
Definition at line 115 of file distort.c.
Referenced by GenerateCoefficients(), and DistortImage().
| static double MagickMax | ( | const double | x, |
| const double | y | ||
| ) | [inline, static] |
Definition at line 81 of file distort.c.
Referenced by GenerateCoefficients().
| static double MagickMin | ( | const double | x, |
| const double | y | ||
| ) | [inline, static] |
Definition at line 77 of file distort.c.
Referenced by GenerateCoefficients().
| static double MagickRound | ( | double | x | ) | [inline, static] |
Definition at line 132 of file distort.c.
Referenced by GenerateCoefficients(), and DistortImage().
| static double poly_basis_dx | ( | ssize_t | n, |
| double | x, | ||
| double | y | ||
| ) | [static] |
Definition at line 226 of file distort.c.
Referenced by poly_basis_dy(), and DistortImage().
| static double poly_basis_dy | ( | ssize_t | n, |
| double | x, | ||
| double | y | ||
| ) | [static] |
| static double poly_basis_fn | ( | ssize_t | n, |
| double | x, | ||
| double | y | ||
| ) | [static] |
Definition at line 170 of file distort.c.
Referenced by GenerateCoefficients(), and DistortImage().
| static const char* poly_basis_str | ( | ssize_t | n | ) | [static] |
Definition at line 198 of file distort.c.
Referenced by DistortImage().
| static size_t poly_number_terms | ( | double | order | ) | [static] |
Definition at line 161 of file distort.c.
References MagickEpsilon.
Referenced by GenerateCoefficients().
| MagickExport Image* RotateImage | ( | const Image * | image, |
| const double | degrees, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 2789 of file distort.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, _PointInfo::x, DegreesToRadians(), _PointInfo::y, MagickEpsilon, IntegralRotateImage(), SetImageVirtualPixelMethod(), BackgroundVirtualPixelMethod, DistortImage(), ScaleRotateTranslateDistortion, and MagickTrue.
Referenced by PreviewImage(), and PolaroidImage().
| MagickExport Image* SparseColorImage | ( | const Image * | image, |
| const SparseColorMethod | method, | ||
| const size_t | number_arguments, | ||
| const double * | arguments, | ||
| ExceptionInfo * | exception | ||
| ) |
Definition at line 2872 of file distort.c.
References _Image::signature, MagickSignature, _Image::debug, MagickFalse, LogMagickEvent(), TraceEvent, GetMagickModule, _Image::filename, _ExceptionInfo::signature, GetPixelRedTraits(), UpdatePixelTrait, GetPixelGreenTraits(), GetPixelBlueTraits(), GetPixelBlackTraits(), _Image::colorspace, CMYKColorspace, GetPixelAlphaTraits(), _Image::matte, SentinelDistortion, ShepardsDistortion, GenerateCoefficients(), GetImageArtifact(), BarycentricColorInterpolate, FormatLocaleFile(), BilinearColorInterpolate, CloneImage(), MagickTrue, SetImageStorageClass(), DirectClass, DestroyImage(), AcquireCacheView(), _Image::rows, GetCacheViewAuthenticPixels(), _Image::columns, GetPixelInfo(), GetPixelInfoPixel(), _PixelInfo::red, _PixelInfo::green, _PixelInfo::blue, _PixelInfo::black, _PixelInfo::alpha, InverseColorInterpolate, ShepardsColorInterpolate, VoronoiColorInterpolate, MagickHuge, QuantumRange, SetPixelInfoPixel(), GetPixelChannels(), SyncCacheViewAuthenticPixels(), _Image::progress_monitor, SetImageProgress(), SparseColorTag, DestroyCacheView(), and RelinquishMagickMemory().