Creates a resampling filter object that corresponds to the default kernel supplied by the vImage framework.


func vImageNewResamplingFilter(_ scale: Float, _ flags: vImage_Flags) -> ResamplingFilter!



A scale factor to associated with the resampling filter object. Shear functions to which you pass the resampling filter object use this factor when performing a shear operation. The shear function applies the scale factor to the entire image, in a direction appropriate to the shear function, either horizontal or vertical.


The options to use when creating the resampling filter object. You must set exactly one of the following flags to specify how vImage handles pixel locations beyond the edge of the source image: kvImageBackgroundColorFill or kvImageEdgeExtend.

Set the kvImageHighQualityResampling flag if you want vImage to use a higher quality, but slower, resampling filter.

Set the kvImageDoNotTile flag if you plan to perform your own tiling or use multithreading.

This function ignores the kvImageLeaveAlphaUnchanged flag.

Return Value

A pointer to a newly created resampling filter object; otherwise NULL.


This function creates a reusable resampling filter object that you can pass to a shear function. The resampling filter encapsulated by the object is the default kernel for vImage This function allocates the memory needed for the resampling filter object. To deallocate this memory, call the function vImageDestroyResamplingFilter(_:). Do not attempt to deallocate the memory yourself.