vImageVerticalShearD_ARGB8888(_:_:_:_:_:_:_:_:_:)
Performs a double-precision vertical shear on a region of interest within an 8-bit-per-channel, 4-channel interleaved image.
Declaration
func vImageVerticalShearD_ARGB8888(_ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ srcOffsetToROI_X: vImagePixelCount, _ srcOffsetToROI_Y: vImagePixelCount, _ yTranslate: Double, _ shearSlope: Double, _ filter: ResamplingFilter!, _ backColor: UnsafePointer<UInt8>!, _ flags: vImage_Flags) -> vImage_ErrorParameters
- src:
A pointer to a vImage buffer structure that contains the source image.
- dest:
A pointer to the destination vImage buffer structure. You’re responsible for filling out the
height,width, androwBytesfields 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, deallocate the memory to prevent memory leaks.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.
- yTranslate:
A translation value for the vertical direction.
- shearSlope:
The slope of the front edge of the sheared image, measured in a clockwise direction.
- filter:
The resampling filter that the function uses. For more information, see Reducing Artifacts With Custom Resampling Filters.
- backColor:
A background color. If you set the
kvImageBackgroundColorFillflag, pass a pixel value. - flags:
The options to use when applying the transform.
To specify how vImage handles pixel locations beyond the edge of the source image, set one of the following flags: Kvimagebackgroundcolorfill or Kvimageedgeextend.
If you want vImage to use a higher quality but a slower resampling filter, set the Kvimagehighqualityresampling flag.
If your code implements its own tiling or its own multithreading, pass Kvimagedonottile.
This function ignores the Kvimageleavealphaunchanged flag.
Return Value
kvImageNoError; otherwise, one of the error codes that Data Types and Constants describes.
Discussion
This function uses a resampling filter that you specify to shear, resize, and translate an image in one dimension. Use the resampling filter’s scale property to resize the image and the translate parameter to adjust the position of the destination image. The function transforms as much of the source image as it needs to fill the destination buffer. Therefore, it can transform pixels outside the region of interest.
This function doesn’t work in place — that is, the source and destination buffers need to point to different memory.