MagickCore  7.0.3
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

§ InterpolativeResizeImageTag

#define InterpolativeResizeImageTag   "Resize/Image"

§ MagnifyImageTag

#define MagnifyImageTag   "Magnify/Image"

Referenced by MagnifyImage().

§ ResampleImageTag

#define ResampleImageTag   "Resample/Image"

§ ResizeImageTag

#define ResizeImageTag   "Resize/Image"

Referenced by HorizontalFilter(), and VerticalFilter().

§ SampleFactor

#define SampleFactor   5

Referenced by ThumbnailImage().

§ SampleImageTag

#define SampleImageTag   "Sample/Image"

Referenced by SampleImage().

§ ScaleImageTag

#define ScaleImageTag   "Scale/Image"

Referenced by ScaleImage().

Typedef Documentation

§ ContributionInfo

Function Documentation

§ AcquireContributionThreadSet()

static ContributionInfo** AcquireContributionThreadSet ( const size_t  count)
static

§ AcquireResizeFilter()

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().

§ AdaptiveResizeImage()

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.

§ BesselOrderOne()

static double BesselOrderOne ( double  x)

Definition at line 1450 of file resize.c.

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

Referenced by Jinc().

§ Blackman()

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().

§ Bohman()

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().

§ Box()

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().

§ Cosine()

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().

§ CubicBC()

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().

§ DestroyContributionThreadSet()

static ContributionInfo** DestroyContributionThreadSet ( ContributionInfo **  contribution)
static

§ DestroyResizeFilter()

MagickPrivate ResizeFilter* DestroyResizeFilter ( ResizeFilter resize_filter)

§ Gaussian()

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().

§ GetResizeFilterBlur()

MagickPrivate double GetResizeFilterBlur ( const ResizeFilter resize_filter)

Definition at line 1534 of file resize.c.

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

§ GetResizeFilterCoefficient()

MagickPrivate double* GetResizeFilterCoefficient ( const ResizeFilter resize_filter)

§ GetResizeFilterScale()

MagickPrivate double GetResizeFilterScale ( const ResizeFilter resize_filter)

Definition at line 1541 of file resize.c.

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

§ GetResizeFilterSupport()

MagickPrivate double GetResizeFilterSupport ( const ResizeFilter resize_filter)

§ GetResizeFilterWeight()

§ GetResizeFilterWeightingType()

MagickPrivate ResizeWeightingFunctionType GetResizeFilterWeightingType ( const ResizeFilter resize_filter)

§ GetResizeFilterWindowSupport()

MagickPrivate double GetResizeFilterWindowSupport ( const ResizeFilter resize_filter)

§ GetResizeFilterWindowWeightingType()

MagickPrivate ResizeWeightingFunctionType GetResizeFilterWindowWeightingType ( const ResizeFilter resize_filter)

§ Hamming()

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().

§ Hann()

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().

§ HorizontalFilter()

§ I0()

static double I0 ( double  x)
static

Definition at line 1300 of file resize.c.

References MagickEpsilon.

Referenced by AcquireResizeFilter(), and Kaiser().

§ InterpolativeResizeImage()

§ J1()

static double J1 ( double  x)
static

Definition at line 1325 of file resize.c.

Referenced by BesselOrderOne().

§ Jinc()

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().

§ Kaiser()

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().

§ Lagrange()

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().

§ LiquidRescaleImage()

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 
)

§ MagnifyImage()

§ MinifyImage()

§ P1()

static double P1 ( double  x)
static

Definition at line 1371 of file resize.c.

Referenced by BesselOrderOne().

§ Q1()

static double Q1 ( double  x)
static

Definition at line 1411 of file resize.c.

Referenced by BesselOrderOne().

§ Quadratic()

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().

§ ResampleImage()

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

§ ResizeImage()

§ SampleImage()

§ ScaleImage()

§ Sinc() [1/2]

static double Sinc ( const double  ,
const ResizeFilter  
)

Referenced by AcquireResizeFilter().

§ Sinc() [2/2]

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.

§ SincFast() [1/2]

static double SincFast ( const double  ,
const ResizeFilter  
)

Referenced by AcquireResizeFilter().

§ SincFast() [2/2]

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.

§ ThumbnailImage()

§ Triangle()

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().

§ VerticalFilter()

§ Welch()

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().