clamped(to:)
Returns a new image created by cropping to a specified area, then making the pixel colors along the edges of the cropped image extend infinitely in all directions.
Declaration
func clamped(to rect: CGRect) -> CIImageParameters
- rect:
The rectangle, in image coordinates, to which to crop the image.
Return Value
An image object representing the result of the clamp operation.
Discussion
Calling this method is equivalent to cropping the image (with the cropped(to:) method or the CICrop filter), then using the clampedToExtent() method (or the CIAffineClamp filter), which creates an image of infinite extent by repeating pixel colors from the edges of the cropped image.
See Also
Creating an Image by Modifying an Existing Image
applyingFilter(_:parameters:)applyingFilter(_:)transformed(by:)transformed(by:highQualityDownsample:)cropped(to:)oriented(forExifOrientation:)clampedToExtent()composited(over:)convertingWorkingSpaceToLab()convertingLabToWorkingSpace()matchedToWorkingSpace(from:)matchedFromWorkingSpace(to:)premultiplyingAlpha()unpremultiplyingAlpha()settingAlphaOne(in:)