hueBlendMode()
Blends colors of two images by computing the sum of image color values.
Declaration
class func hueBlendMode() -> any CIFilter & CICompositeOperationReturn Value
The modified image.
Discussion
This method applies the hue-blend mode filter to an image. The effect uses the values of the saturation and luminance from the background image with the hue of the input image to produce the output.
The hue-blend mode filter uses the following properties:
The following code creates a filter that applies the hue-blend mode filter.
func hueBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {
let colorBlendFilter = CIFilter.hueBlendMode()
colorBlendFilter.inputImage = inputImage
colorBlendFilter.backgroundImage = backgroundImage
return colorBlendFilter.outputImage!
}[Image]