linearLightBlendMode()
A combination of linear burn and linear dodge blend modes.
Declaration
class func linearLightBlendMode() -> any CIFilter & CICompositeOperationReturn 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.
inputImageA CIImage containing the input image
backgroundImageA 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]