MagickCore  7.0.7
Convert, Edit, Or Compose Bitmap Images
resample.c File Reference
Include dependency graph for resample.c:

Go to the source code of this file.

Data Structures

struct  _ResampleFilter
 

Macros

#define EWA   1 /* Normal EWA handling - raw or clamped */
 
#define EWA_CLAMP   1 /* EWA Clamping from Nicolas Robidoux */
 
#define FILTER_LUT   1 /* Use a LUT rather then direct filter calls */
 
#define DEBUG_ELLIPSE   0 /* output ellipse info for debug */
 
#define DEBUG_HIT_MISS   0 /* output hit/miss pixels (as gnuplot commands) */
 
#define DEBUG_NO_PIXEL_HIT   0 /* Make pixels that fail to hit anything - RED */
 
#define WLUT_WIDTH   1024 /* size of the filter cache */
 
#define DEBUG_HIT_MISS   0 /* only valid if DEBUG_ELLIPSE is enabled */
 

Functions

MagickExport ResampleFilterAcquireResampleFilter (const Image *image, ExceptionInfo *exception)
 
MagickExport ResampleFilterDestroyResampleFilter (ResampleFilter *resample_filter)
 
MagickExport MagickBooleanType ResamplePixelColor (ResampleFilter *resample_filter, const double u0, const double v0, PixelInfo *pixel, ExceptionInfo *exception)
 
static void ClampUpAxes (const double dux, const double dvx, const double duy, const double dvy, double *major_mag, double *minor_mag, double *major_unit_x, double *major_unit_y, double *minor_unit_x, double *minor_unit_y)
 
MagickExport void ScaleResampleFilter (ResampleFilter *resample_filter, const double dux, const double duy, const double dvx, const double dvy)
 
MagickExport void SetResampleFilter (ResampleFilter *resample_filter, const FilterType filter)
 
MagickExport MagickBooleanType SetResampleFilterInterpolateMethod (ResampleFilter *resample_filter, const PixelInterpolateMethod method)
 
MagickExport MagickBooleanType SetResampleFilterVirtualPixelMethod (ResampleFilter *resample_filter, const VirtualPixelMethod method)
 

Macro Definition Documentation

◆ DEBUG_ELLIPSE

#define DEBUG_ELLIPSE   0 /* output ellipse info for debug */

Definition at line 82 of file resample.c.

◆ DEBUG_HIT_MISS [1/2]

#define DEBUG_HIT_MISS   0 /* output hit/miss pixels (as gnuplot commands) */

Definition at line 83 of file resample.c.

◆ DEBUG_HIT_MISS [2/2]

#define DEBUG_HIT_MISS   0 /* only valid if DEBUG_ELLIPSE is enabled */

Definition at line 83 of file resample.c.

◆ DEBUG_NO_PIXEL_HIT

#define DEBUG_NO_PIXEL_HIT   0 /* Make pixels that fail to hit anything - RED */

Definition at line 84 of file resample.c.

◆ EWA

#define EWA   1 /* Normal EWA handling - raw or clamped */

Definition at line 75 of file resample.c.

◆ EWA_CLAMP

#define EWA_CLAMP   1 /* EWA Clamping from Nicolas Robidoux */

Definition at line 77 of file resample.c.

◆ FILTER_LUT

#define FILTER_LUT   1 /* Use a LUT rather then direct filter calls */

Definition at line 79 of file resample.c.

◆ WLUT_WIDTH

#define WLUT_WIDTH   1024 /* size of the filter cache */

Definition at line 87 of file resample.c.

Referenced by ResamplePixelColor(), ScaleResampleFilter(), and SetResampleFilter().

Function Documentation

◆ AcquireResampleFilter()

◆ ClampUpAxes()

static void ClampUpAxes ( const double  dux,
const double  dvx,
const double  duy,
const double  dvy,
double *  major_mag,
double *  minor_mag,
double *  major_unit_x,
double *  major_unit_y,
double *  minor_unit_x,
double *  minor_unit_y 
)
inlinestatic

Definition at line 709 of file resample.c.

Referenced by ScaleResampleFilter().

◆ DestroyResampleFilter()

◆ ResamplePixelColor()

MagickExport MagickBooleanType ResamplePixelColor ( ResampleFilter resample_filter,
const double  u0,
const double  v0,
PixelInfo pixel,
ExceptionInfo exception 
)

Definition at line 315 of file resample.c.

References _ResampleFilter::A, AcquireVirtualCacheView(), _PixelInfo::alpha, _PixelInfo::alpha_trait, _ResampleFilter::average_defined, _ResampleFilter::average_pixel, AverageInterpolatePixel, _ResampleFilter::B, _Image::background_color, BackgroundVirtualPixelMethod, _PixelInfo::black, BlackVirtualPixelMethod, _PixelInfo::blue, BoxFilter, _ResampleFilter::C, CheckerTileVirtualPixelMethod, ClampToQuantum(), CMYKColorspace, _PixelInfo::colorspace, _Image::columns, DestroyCacheView(), DestroyImage(), DitherVirtualPixelMethod, _ResampleFilter::do_interpolate, EdgeVirtualPixelMethod, _ResampleFilter::exception, _ResampleFilter::filter_lut, FormatLocaleFile(), GetCacheViewVirtualPixels(), GetPixelAlpha(), GetPixelBlack(), GetPixelBlue(), GetPixelChannels(), GetPixelGreen(), GetPixelInfo(), GetPixelInfoPixel(), GetPixelRed(), GetResizeFilterWeight(), GrayVirtualPixelMethod, _PixelInfo::green, HorizontalTileEdgeVirtualPixelMethod, HorizontalTileVirtualPixelMethod, _ResampleFilter::image, IntegerInterpolatePixel, _ResampleFilter::interpolate, InterpolatePixelInfo(), _ResampleFilter::limit_reached, MagickCoreSignature, MagickEpsilon, MagickFalse, MagickTrue, MaskVirtualPixelMethod, MirrorVirtualPixelMethod, QuantumRange, QuantumScale, RandomVirtualPixelMethod, _PixelInfo::red, ResizeImage(), _Image::rows, _ResampleFilter::signature, _ResampleFilter::slope, TileVirtualPixelMethod, TransparentVirtualPixelMethod, _ResampleFilter::Ulimit, UndefinedPixelTrait, UndefinedVirtualPixelMethod, _ResampleFilter::Uwidth, VerticalTileEdgeVirtualPixelMethod, VerticalTileVirtualPixelMethod, _ResampleFilter::view, _ResampleFilter::virtual_pixel, _ResampleFilter::Vlimit, WhiteVirtualPixelMethod, and WLUT_WIDTH.

Referenced by CompositeImage(), and DistortImage().

◆ ScaleResampleFilter()

◆ SetResampleFilter()

◆ SetResampleFilterInterpolateMethod()

◆ SetResampleFilterVirtualPixelMethod()