hueAdjust()
Modifies an image’s hue.
Declaration
class func hueAdjust() -> any CIFilter & CIHueAdjustReturn Value
The modified image.
Discussion
This method applies the hue-adjust filter to an image. The effect changes the hue or color of the pixels by using the angle to modify the image’s color data.
The hue-adjust filter uses the following properties:
angleA
floatrepresenting the angle in radians to adjust the current hue of the image as an NSNumber.inputImageAn image with the type CIImage.
The following code creates a filter that shifts the hue of the image by 5 radians.
func hueAdjust(inputImage: CIImage) -> CIImage {
let hueAdjustFilter = CIFilter.hueAdjust()
hueAdjustFilter.inputImage = inputImage
hueAdjustFilter.angle = 5
return hueAdjustFilter.outputImage!
}[Image]