Contents

maximumComponent()

Creates a maximum RGB grayscale image.

Declaration

class func maximumComponent() -> any CIFilter & CIMaximumComponent

Return Value

The modified image.

Discussion

This method applies the maximum component filter to an image. The effect applies a preconfigured set of effects that result in the input image becoming grayscale using the maximum RGB color components.

The maximum component filter uses the following property:

inputImage

An image with the type CIImage.

The following code creates a filter that adds brightness and makes the input image grayscale:

func maximumComponent(inputImage: CIImage) -> CIImage {
    let maximumComponentFilter = CIFilter.maximumComponent()
    maximumComponentFilter.inputImage = inputImage
    return maximumComponentFilter.outputImage!
}

[Image]

See Also

Color Effect Filters