Contents

minimumComponent()

Creates a minimum RGB grayscale image.

Declaration

class func minimumComponent() -> any CIFilter & CIMinimumComponent

Mentioned in

Return Value

The modified image.

Discussion

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

The minimum component filter uses the following property:

inputImage

An image with the type CIImage.

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

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

[Image]

See Also

Color Effect Filters