divideBlendMode()
Divides color values to blend colors.
Declaration
class func divideBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the divide-blend mode filter to an image. The effect divides the background image color values by the color values of the input image, resulting in the output image.
The divide-blend mode filter uses the following properties:
The following code creates a filter that brightens and inverts colors in the background image:
func divideBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let divideBlendMode = CIFilter.divideBlendMode()
divideBlendMode.inputImage = inputImage
divideBlendMode.backgroundImage = backgroundImage
return divideBlendMode.outputImage!
}[Image]