Contents

whitePointAdjust()

Adjusts the image’s white-point.

Declaration

class func whitePointAdjust() -> any CIFilter & CIWhitePointAdjust

Return Value

The modified image.

Discussion

This method applies the white-point adjust filter to an image. The effect adjusts the white-point of the input image by mapping all shades of gray to shades of the color property.

The white-point adjust filter uses the following properties:

color

The new white point color with the type of CIColor.

inputImage

An image with the type CIImage.

The following code creates a filter that adds a red hue to the input image:

func whitePoint(inputImage: CIImage) -> CIImage {
    let whitePointFilter = CIFilter.whitePointAdjust()
    whitePointFilter.inputImage = inputImage
    whitePointFilter.color = CIColor(red: 1, green: 0.6, blue: 0.6, alpha: 1)
    return whitePointFilter.outputImage!
}

[Image]

See Also

Filters