distort.c File Reference

#include "MagickCore/studio.h"
#include "MagickCore/artifact.h"
#include "MagickCore/cache.h"
#include "MagickCore/cache-view.h"
#include "MagickCore/channel.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/image.h"
#include "MagickCore/linked-list.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/pixel-private.h"
#include "MagickCore/resample.h"
#include "MagickCore/resample-private.h"
#include "MagickCore/registry.h"
#include "MagickCore/resource_.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"

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 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 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 ImageAffineTransformImage (const Image *image, const AffineMatrix *affine_matrix, ExceptionInfo *exception)
static double MagickRound (double x)
static double * GenerateCoefficients (const Image *image, DistortMethod *method, const size_t number_arguments, const double *arguments, size_t number_values, ExceptionInfo *exception)
MagickExport ImageDistortResizeImage (const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
MagickExport ImageDistortImage (const Image *image, DistortMethod method, const size_t number_arguments, const double *arguments, MagickBooleanType bestfit, ExceptionInfo *exception)
MagickExport ImageRotateImage (const Image *image, const double degrees, ExceptionInfo *exception)
MagickExport ImageSparseColorImage (const Image *image, const SparseColorMethod method, const size_t number_arguments, const double *arguments, ExceptionInfo *exception)

Define Documentation

#define DistortImageTag   "Distort/Image"

Referenced by DistortImage().

#define DistortResizeImageTag   "Distort/Image"
#define ExpandBounds (  ) 
Value:
{ \
  /* 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 (  ) 
Value:
{ \
  /* 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,
 ) 
Value:
ScaleResampleFilter( (F), \
      output_scaling*(A), output_scaling*(B), \
      output_scaling*(C), output_scaling*(D) )

Referenced by DistortImage().

#define SparseColorTag   "Distort/SparseColor"

Referenced by SparseColorImage().


Function Documentation

static void AffineArgsToCoefficients ( double *  affine  )  [inline, static]

Referenced by GenerateCoefficients().

MagickExport Image* AffineTransformImage ( const Image image,
const AffineMatrix affine_matrix,
ExceptionInfo exception 
)
static void CoefficientsToAffineArgs ( double *  coeff  )  [inline, static]

Referenced by DistortImage().

MagickExport Image* DistortImage ( const Image image,
DistortMethod  method,
const size_t  number_arguments,
const double *  arguments,
MagickBooleanType  bestfit,
ExceptionInfo exception 
)

References AcquireAuthenticCacheView(), AcquireQuantumMemory(), AcquireResampleFilterThreadSet(), AffineDistortion, _Image::alpha_trait, _PixelInfo::alpha_trait, ArcDistortion, _Image::background_color, BarrelDistortion, BarrelInverseDistortion, BilinearDistortion, BilinearForwardDistortion, BilinearReverseDistortion, BlendPixelTrait, CloneImage(), CoefficientsToAffineArgs(), _Image::colorspace, _Image::columns, CompositePixelInfoBlend(), ConformPixelInfo(), Cylinder2PlaneDistortion, _Image::debug, DePolarDistortion, DestroyCacheView(), DestroyImage(), DestroyResampleFilterThreadSet(), DirectClass, DistortImageTag, DistortResizeImage(), ExpandBounds, _Image::filename, FormatLocaleFile(), FormatLocaleString(), GenerateCoefficients(), GetImageArtifact(), GetMagickModule, GetMagickPrecision(), GetOpenMPThreadId(), GetPixelChannels(), GetPixelInfo(), _RectangleInfo::height, InitalBounds, InvertAffineCoefficients(), InvertPerspectiveCoefficients(), IsGrayColorspace(), IsPixelInfoGray(), IsStringTrue(), LogMagickEvent(), Magick2PI, magick_restrict, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickPathExtent, MagickPI, MagickPI2, MagickRound(), MagickTrue, _Image::matte_color, NoValue, OptionError, OptionWarning, _Image::page, ParseAbsoluteGeometry(), PerceptibleReciprocal(), PerspectiveDistortion, Plane2CylinderDistortion, PolarDistortion, poly_basis_dx(), poly_basis_dy(), poly_basis_fn(), poly_basis_str(), PolynomialDistortion, _Image::progress_monitor, QueueCacheViewAuthenticPixels(), RadiansToDegrees(), RelinquishMagickMemory(), ResamplePixelColor(), ResizeDistortion, ResourceLimitError, RigidAffineDistortion, _Image::rows, ScaleFilter, SetImageColorspace(), SetImageProgress(), SetImageStorageClass(), SetPixelViaPixelInfo(), ShepardsDistortion, _ExceptionInfo::signature, _Image::signature, sRGBColorspace, StringToDouble(), SyncCacheViewAuthenticPixels(), ThrowMagickException(), TraceEvent, UndefinedPixelTrait, UndefinedVirtualPixelMethod, _RectangleInfo::width, _PointInfo::x, _RectangleInfo::x, _PointInfo::y, and _RectangleInfo::y.

Referenced by AffineTransformImage(), DistortResizeImage(), and RotateImage().

MagickExport Image* DistortResizeImage ( const Image image,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)
static double* GenerateCoefficients ( const Image image,
DistortMethod method,
const size_t  number_arguments,
const double *  arguments,
size_t  number_values,
ExceptionInfo exception 
) [static]
static void InvertAffineCoefficients ( const double *  coeff,
double *  inverse 
) [static]
static void InvertPerspectiveCoefficients ( const double *  coeff,
double *  inverse 
) [static]
static double MagickRound ( double  x  )  [inline, static]
static double poly_basis_dx ( ssize_t  n,
double  x,
double  y 
) [static]

Referenced by DistortImage(), and poly_basis_dy().

static double poly_basis_dy ( ssize_t  n,
double  x,
double  y 
) [static]

References poly_basis_dx().

Referenced by DistortImage().

static double poly_basis_fn ( ssize_t  n,
double  x,
double  y 
) [static]
static const char* poly_basis_str ( ssize_t  n  )  [static]

Referenced by DistortImage().

static size_t poly_number_terms ( double  order  )  [static]

References MagickEpsilon.

Referenced by GenerateCoefficients().

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 
)

Generated on 18 May 2020 for MagickCore by  doxygen 1.6.1