screenBlendMode()
Blends colors of two images by multiplying colors.
Declaration
class func screenBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the screen-blend mode filter to an image. The effect calculates the colors in the output image by multiplying the inverse color values for the input and background images, resulting in a brighter image.
The screen-blend mode filter uses the following properties:
The following code creates a filter that results in the image becoming lighter with colors from the input and background image:
func screenBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let screenBlendMode = CIFilter.screenBlendMode()
screenBlendMode.inputImage = inputImage
screenBlendMode.backgroundImage = backgroundImage
return screenBlendMode.outputImage!
}[Image]