linearDodgeBlendMode()
Blends colors of two images with dodging.
Declaration
class func linearDodgeBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the linear-dodge-blend mode filter to an image. The effect calculates the brightness value for the background image then brightens it to reflect the brightness of the input image. The effect then increases the contrast in the output image.
The linear-dodge-blend mode filter uses the following properties:
The following code creates a filter that results in the image becoming brighter with both images’ colors:
func linearDodgeBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let colorBlendFilter = CIFilter.linearDodgeBlendMode()
colorBlendFilter.inputImage = inputImage
colorBlendFilter.backgroundImage = backgroundImage
return colorBlendFilter.outputImage!
}[Image]