Function

vImageHorizontalShear_ARGBFFFF

Performs a horizontal shear operation on a region of interest within an ARGBFFFF source image.

Declaration

vImage_Error vImageHorizontalShear_ARGBFFFF(const vImage_Buffer *src, const vImage_Buffer *dest, vImagePixelCount srcOffsetToROI_X, vImagePixelCount srcOffsetToROI_Y, float xTranslate, float shearSlope, ResamplingFilter filter, const Pixel_FFFF backColor, vImage_Flags flags);

Parameters

src

A pointer to a vImage buffer structure that contains the source image whose data you want to shear.

dest

A pointer to a vImage buffer data structure. You're responsible for filling out the height, width, and rowBytes fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer this structure points to contains the destination image data. When you no longer need the data buffer, you must deallocate the memory..

This parameter also specifies the size of the region of interest within the source image. The region of interest has the same height and width as the destination image buffer.

srcOffsetToROI_X

The horizontal offset, in pixels, from the upper-left pixel of the region of interest within the source image.

srcOffsetToROI_Y

The vertical offset, in pixels, from the upper-left pixel of the region of interest within the source image.

xTranslate

A translation value for the horizontal direction.

shearSlope

The slope of the front edge of the sheared image, measured in a clockwise direction.

filter

The resampling filter to be used with this function. You create this object by calling vImageNewResamplingFilter (to use a default resampling filter supplied by vImage) or vImageNewResamplingFilterForFunctionUsingBuffer (to use a custom resampling filter that you supply). When the resampling filter is created, you can also set a scale factor that will be used in the horizontal shear operation.

backgroundColor

A background color. Pass a pixel value only if you also set the kvImageBackgroundColorFill flag.

flags

The options to use when applying the shear.

To specify how vImage handles pixel locations beyond the edge of the source image, you must set exactly one of the following flags: kvImageBackgroundColorFill or kvImageEdgeExtend.

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

If you plan to perform your own tiling or use multithreading, set the kvImageDoNotTile flag.

Return Value

kvImageNoError; otherwise, one of the error codes described in Data Types and Constants.

Discussion

This function also translates and scales the image, both in the horizontal direction. The function transforms as much of the source image as it needs in order to attempt to fill the destination buffer, which means it can transform pixels outside the region of interest.

See Also

Single-Precision Horizontal Shearing

vImageHorizontalShear_ARGB8888

Performs a horizontal shear operation on a region of interest within an ARGB8888 source image.

vImageHorizontalShear_ARGB16U

Performs a horizontal shear operation on a region of interest within an ARGB16U source image.

vImageHorizontalShear_ARGB16S

Performs a horizontal shear operation on a region of interest within an ARGB16S source image.

vImageHorizontalShear_XRGB2101010W

Performs a horizontal shear operation on a region of interest within an XRGB2101010W source image.

vImageHorizontalShear_CbCr8

Performs a horizontal shear operation on a region of interest within a CbCr8 source image.

vImageHorizontalShear_CbCr16U

Performs a horizontal shear operation on a region of interest within a CbCr16U source image.

vImageHorizontalShear_Planar16S

Performs a horizontal shear operation on a region of interest within a Planar16S source image.

vImageHorizontalShear_Planar16U

Performs a horizontal shear operation on a region of interest within a Planar16U source image.

vImageHorizontalShear_PlanarF

Performs a horizontal shear operation on a region of interest within a PlanarF source image.

vImageHorizontalShear_Planar8

Performs a horizontal shear operation on a region of interest within a Planar8 source image.