linearBurnBlendMode()
Blends color from two images while increasing contrast.
Declaration
class func linearBurnBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the linear-burn blend mode filter to an image. The effect calculates the brightness value for the background image then darkens it to reflect the brightness of the input image. The effect then decreases the contrast in the output image.
The linear-burn blend mode filter uses the following properties:
The following code creates a filter that results in an output image that’s much darker with very little visible detail:
func linearBurnBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let colorBlendFilter = CIFilter.linearBurnBlendMode()
colorBlendFilter.inputImage = inputImage
colorBlendFilter.backgroundImage = backgroundImage
return colorBlendFilter.outputImage!
}[Image]