Contents

linearLightBlendMode()

A combination of linear burn and linear dodge blend modes.

Declaration

class func linearLightBlendMode() -> any CIFilter & CICompositeOperation

Return Value

The blended image as a CIImage.

Discussion

The linear-light blend mode combines the linear-dodge and linear-burn blend modes (rescaled so that neutral colors become middle gray). If the input image’s values are lighter than middle gray, the filter uses dodge; for darker values, the filter uses burn.

inputImage

A CIImage containing the input image

backgroundImage

A CIImage containing the background image.

The following code sample applies the linear-light blend mode filter to two images:

func linearLightBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
    let filter = CIFilter.linearLightBlendMode()
    filter.inputImage = inputImage
    filter.backgroundImage = backgroundImage
    return filter.outputImage!
}

[Image]

See Also

Filters