MagickCore  7.0.2
resize.c File Reference
Include dependency graph for resize.c:

Go to the source code of this file.

Data Structures

struct  _ResizeFilter
 
struct  _ContributionInfo
 

Macros

#define InterpolativeResizeImageTag   "Resize/Image"
 
#define MagnifyImageTag   "Magnify/Image"
 
#define ResampleImageTag   "Resample/Image"
 
#define ResizeImageTag   "Resize/Image"
 
#define SampleImageTag   "Sample/Image"
 
#define ScaleImageTag   "Scale/Image"
 
#define SampleFactor   5
 

Typedefs

typedef struct _ContributionInfo ContributionInfo
 

Functions

static double I0 (double x)
 
static double BesselOrderOne (double)
 
static double Sinc (const double, const ResizeFilter *)
 
static double SincFast (const double, const ResizeFilter *)
 
static double Blackman (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Bohman (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Box (const double magick_unused(x), const ResizeFilter *magick_unused(resize_filter))
 
static double Cosine (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double CubicBC (const double x, const ResizeFilter *resize_filter)
 
static double Gaussian (const double x, const ResizeFilter *resize_filter)
 
static double Hann (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Hamming (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Jinc (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Kaiser (const double x, const ResizeFilter *resize_filter)
 
static double Lagrange (const double x, const ResizeFilter *resize_filter)
 
static double Quadratic (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Sinc (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double SincFast (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Triangle (const double x, const ResizeFilter *magick_unused(resize_filter))
 
static double Welch (const double x, const ResizeFilter *magick_unused(resize_filter))
 
MagickPrivate ResizeFilterAcquireResizeFilter (const Image *image, const FilterType filter, const MagickBooleanType cylindrical, ExceptionInfo *exception)
 
MagickExport ImageAdaptiveResizeImage (const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
static double J1 (double x)
 
static double P1 (double x)
 
static double Q1 (double x)
 
MagickPrivate ResizeFilterDestroyResizeFilter (ResizeFilter *resize_filter)
 
MagickPrivate double * GetResizeFilterCoefficient (const ResizeFilter *resize_filter)
 
MagickPrivate double GetResizeFilterBlur (const ResizeFilter *resize_filter)
 
MagickPrivate double GetResizeFilterScale (const ResizeFilter *resize_filter)
 
MagickPrivate double GetResizeFilterWindowSupport (const ResizeFilter *resize_filter)
 
MagickPrivate ResizeWeightingFunctionType GetResizeFilterWeightingType (const ResizeFilter *resize_filter)
 
MagickPrivate ResizeWeightingFunctionType GetResizeFilterWindowWeightingType (const ResizeFilter *resize_filter)
 
MagickPrivate double GetResizeFilterSupport (const ResizeFilter *resize_filter)
 
MagickPrivate double GetResizeFilterWeight (const ResizeFilter *resize_filter, const double x)
 
MagickExport ImageInterpolativeResizeImage (const Image *image, const size_t columns, const size_t rows, const PixelInterpolateMethod method, ExceptionInfo *exception)
 
MagickExport ImageLiquidRescaleImage (const Image *image, const size_t magick_unused(columns), const size_t magick_unused(rows), const double magick_unused(delta_x), const double magick_unused(rigidity), ExceptionInfo *exception)
 
MagickExport ImageMagnifyImage (const Image *image, ExceptionInfo *exception)
 
MagickExport ImageMinifyImage (const Image *image, ExceptionInfo *exception)
 
MagickExport ImageResampleImage (const Image *image, const double x_resolution, const double y_resolution, const FilterType filter, ExceptionInfo *exception)
 
static ContributionInfo ** DestroyContributionThreadSet (ContributionInfo **contribution)
 
static ContributionInfo ** AcquireContributionThreadSet (const size_t count)
 
static MagickBooleanType HorizontalFilter (const ResizeFilter *resize_filter, const Image *image, Image *resize_image, const double x_factor, const MagickSizeType span, MagickOffsetType *offset, ExceptionInfo *exception)
 
static MagickBooleanType VerticalFilter (const ResizeFilter *resize_filter, const Image *image, Image *resize_image, const double y_factor, const MagickSizeType span, MagickOffsetType *offset, ExceptionInfo *exception)
 
MagickExport ImageResizeImage (const Image *image, const size_t columns, const size_t rows, const FilterType filter, ExceptionInfo *exception)
 
MagickExport ImageSampleImage (const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
MagickExport ImageScaleImage (const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
 
MagickExport ImageThumbnailImage (const Image *image, const size_t columns, const size_t rows, ExceptionInfo *exception)
 

Macro Definition Documentation

#define InterpolativeResizeImageTag   "Resize/Image"
#define MagnifyImageTag   "Magnify/Image"

Referenced by MagnifyImage().

#define ResampleImageTag   "Resample/Image"
#define ResizeImageTag   "Resize/Image"

Referenced by HorizontalFilter(), and VerticalFilter().

#define SampleFactor   5

Referenced by ThumbnailImage().

#define SampleImageTag   "Sample/Image"

Referenced by SampleImage().

#define ScaleImageTag   "Scale/Image"

Referenced by ScaleImage().

Typedef Documentation

Function Documentation

static ContributionInfo** AcquireContributionThreadSet ( const size_t  count)
static
MagickPrivate ResizeFilter* AcquireResizeFilter ( const Image image,
const FilterType  filter,
const MagickBooleanType  cylindrical,
ExceptionInfo exception 
)

Definition at line 717 of file resize.c.

References AcquireMagickMemory(), Blackman(), BlackmanFilter, BlackmanWeightingFunction, _ResizeFilter::blur, Bohman(), BohmanFilter, BohmanWeightingFunction, Box(), BoxFilter, BoxWeightingFunction, CatromFilter, _ResizeFilter::coefficient, CommandOptionToMnemonic(), Cosine(), CosineFilter, CosineWeightingFunction, CubicBC(), CubicBCWeightingFunction, CubicFilter, _Image::debug, DeleteImageArtifact(), _Image::filename, _ResizeFilter::filter, _ResizeFilter::filterWeightingType, FormatLocaleFile(), Gaussian(), GaussianFilter, GaussianWeightingFunction, GetImageArtifact(), GetMagickModule, GetMagickPrecision(), GetResizeFilterSupport(), GetResizeFilterWeight(), Hamming(), HammingFilter, HammingWeightingFunction, Hann(), HannFilter, HannWeightingFunction, HermiteFilter, I0(), IsStringTrue(), Jinc(), JincFilter, JincWeightingFunction, Kaiser(), KaiserFilter, KaiserWeightingFunction, Lagrange(), LagrangeFilter, LagrangeWeightingFunction, Lanczos2Filter, Lanczos2SharpFilter, LanczosFilter, LanczosRadiusFilter, LanczosSharpFilter, LogMagickEvent(), Magick2PI, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickFilterOptions, MagickPI, MagickSQ1_2, MitchellFilter, ParseCommandOption(), PerceptibleReciprocal(), PointFilter, Quadratic(), QuadraticFilter, QuadraticWeightingFunction, ResetMagickMemory(), ResourceLimitFatalError, RobidouxFilter, RobidouxSharpFilter, _ResizeFilter::scale, SentinelFilter, _ResizeFilter::signature, _ExceptionInfo::signature, _Image::signature, Sinc(), SincFast(), SincFastFilter, SincFastWeightingFunction, SincFilter, SincWeightingFunction, SplineFilter, StringToDouble(), StringToLong(), _ResizeFilter::support, ThrowFatalException, TraceEvent, Triangle(), TriangleFilter, TriangleWeightingFunction, UndefinedFilter, Welch(), WelchFilter, WelchWeightingFunction, _ResizeFilter::window, _ResizeFilter::window_support, and _ResizeFilter::windowWeightingType.

Referenced by ResizeImage().

MagickExport Image* AdaptiveResizeImage ( const Image image,
const size_t  columns,
const size_t  rows,
ExceptionInfo exception 
)

Definition at line 1249 of file resize.c.

References InterpolativeResizeImage(), and MeshInterpolatePixel.

static double BesselOrderOne ( double  x)

Definition at line 1450 of file resize.c.

References J1(), MagickPI, P1(), and Q1().

Referenced by Jinc().

static double Blackman ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 149 of file resize.c.

References magick_unreferenced, and MagickPI.

Referenced by AcquireResizeFilter().

static double Bohman ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 164 of file resize.c.

References magick_unreferenced, and MagickPI.

Referenced by AcquireResizeFilter().

static double Box ( const double   magick_unusedx,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 181 of file resize.c.

References magick_unreferenced.

Referenced by AcquireResizeFilter(), and GetResizeFilterWeight().

static double Cosine ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 195 of file resize.c.

References magick_unreferenced, and MagickPI2.

Referenced by AcquireResizeFilter().

static double CubicBC ( const double  x,
const ResizeFilter resize_filter 
)
static

Definition at line 207 of file resize.c.

References _ResizeFilter::coefficient.

Referenced by AcquireResizeFilter().

static ContributionInfo** DestroyContributionThreadSet ( ContributionInfo **  contribution)
static
MagickPrivate ResizeFilter* DestroyResizeFilter ( ResizeFilter resize_filter)
static double Gaussian ( const double  x,
const ResizeFilter resize_filter 
)
static

Definition at line 247 of file resize.c.

References _ResizeFilter::coefficient.

Referenced by AcquireResizeFilter().

MagickPrivate double GetResizeFilterBlur ( const ResizeFilter resize_filter)

Definition at line 1534 of file resize.c.

References _ResizeFilter::blur, MagickCoreSignature, and _ResizeFilter::signature.

MagickPrivate double* GetResizeFilterCoefficient ( const ResizeFilter resize_filter)
MagickPrivate double GetResizeFilterScale ( const ResizeFilter resize_filter)

Definition at line 1541 of file resize.c.

References MagickCoreSignature, _ResizeFilter::scale, and _ResizeFilter::signature.

MagickPrivate double GetResizeFilterSupport ( const ResizeFilter resize_filter)
MagickPrivate ResizeWeightingFunctionType GetResizeFilterWeightingType ( const ResizeFilter resize_filter)
MagickPrivate double GetResizeFilterWindowSupport ( const ResizeFilter resize_filter)
MagickPrivate ResizeWeightingFunctionType GetResizeFilterWindowWeightingType ( const ResizeFilter resize_filter)
static double Hamming ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 294 of file resize.c.

References magick_unreferenced, and MagickPI.

Referenced by AcquireResizeFilter().

static double Hann ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 282 of file resize.c.

References magick_unreferenced, and MagickPI.

Referenced by AcquireResizeFilter().

static double I0 ( double  x)
static

Definition at line 1300 of file resize.c.

References MagickEpsilon.

Referenced by AcquireResizeFilter(), and Kaiser().

static double J1 ( double  x)
static

Definition at line 1325 of file resize.c.

Referenced by BesselOrderOne().

static double Jinc ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 306 of file resize.c.

References BesselOrderOne(), magick_unreferenced, and MagickPI.

Referenced by AcquireResizeFilter().

static double Kaiser ( const double  x,
const ResizeFilter resize_filter 
)
static

Definition at line 324 of file resize.c.

References _ResizeFilter::coefficient, and I0().

Referenced by AcquireResizeFilter().

static double Lagrange ( const double  x,
const ResizeFilter resize_filter 
)
static

Definition at line 342 of file resize.c.

References _ResizeFilter::support, and _ResizeFilter::window_support.

Referenced by AcquireResizeFilter().

MagickExport Image* LiquidRescaleImage ( const Image image,
const size_t   magick_unusedcolumns,
const size_t   magick_unusedrows,
const double   magick_unuseddelta_x,
const double   magick_unusedrigidity,
ExceptionInfo exception 
)
static double P1 ( double  x)
static

Definition at line 1371 of file resize.c.

Referenced by BesselOrderOne().

static double Q1 ( double  x)
static

Definition at line 1411 of file resize.c.

Referenced by BesselOrderOne().

static double Quadratic ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 375 of file resize.c.

References magick_unreferenced.

Referenced by AcquireResizeFilter().

MagickExport Image* ResampleImage ( const Image image,
const double  x_resolution,
const double  y_resolution,
const FilterType  filter,
ExceptionInfo exception 
)
static double Sinc ( const double  ,
const ResizeFilter  
)

Referenced by AcquireResizeFilter().

static double Sinc ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 390 of file resize.c.

References magick_unreferenced, and MagickPI.

static double SincFast ( const double  ,
const ResizeFilter  
)

Referenced by AcquireResizeFilter().

static double SincFast ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 407 of file resize.c.

References magick_unreferenced, and MagickPI.

static double Triangle ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 503 of file resize.c.

References magick_unreferenced.

Referenced by AcquireResizeFilter().

static double Welch ( const double  x,
const ResizeFilter magick_unusedresize_filter 
)
static

Definition at line 518 of file resize.c.

References magick_unreferenced.

Referenced by AcquireResizeFilter().