vividLightBlendMode()
A combination of color-burn and color-dodge blend modes.
Declaration
class func vividLightBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The blended image as a CIImage.
Discussion
The vivid-light blend mode combines the color-dodge and color-burn blend modes (rescaled so that neutral colors become middle gray). If the input Images 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 vivid-light blend mode filter to two images:
func vividLightBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let filter = CIFilter.vividLightBlendMode()
filter.inputImage = inputImage
filter.backgroundImage = backgroundImage
return filter.outputImage!
}[Image]