---
title: blendWithBlueMask()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/blendwithbluemask()
---

# blendWithBlueMask()

Blends two images by using a blue mask image.

## Declaration

```swift
class func blendWithBlueMask() -> any CIFilter & CIBlendWithMask
```

## Return Value

Return Value The modified image.

## Discussion

Discussion This method applies the blend with blue mask filter to an image. The effect uses values from the blue mask image to interpolate between the input and background images. The mask image is made of shades of blue that define the strength of the interpolation from zero (where the mask image is black) to the specified radius (where the mask image is blue). The blend with blue mask filter uses the following properties: The following code creates a filter that results in the replacement of blue in the mask image with the detail of the input image: func blendWithBlueMask(inputimage: CIImage, backgroundimage: CIImage, maskimage: CIImage) -> CIImage {     let  blendWithBlueMaskFilter = CIFilter.blendWithBlueMask()     blendWithBlueMaskFilter.inputImage = inputimage     blendWithBlueMaskFilter.maskImage = maskimage     blendWithBlueMaskFilter.backgroundImage = backgroundimage     return blendWithBlueMaskFilter.outputImage! }

## See Also

### Filters

- [blendWithAlphaMask()](coreimage/cifilter-swift.class/blendwithalphamask().md)
- [blendWithMask()](coreimage/cifilter-swift.class/blendwithmask().md)
- [blendWithRedMask()](coreimage/cifilter-swift.class/blendwithredmask().md)
- [bloom()](coreimage/cifilter-swift.class/bloom().md)
- [cannyEdgeDetector()](coreimage/cifilter-swift.class/cannyedgedetector().md)
- [comicEffect()](coreimage/cifilter-swift.class/comiceffect().md)
- [coreMLModel()](coreimage/cifilter-swift.class/coremlmodel().md)
- [crystallize()](coreimage/cifilter-swift.class/crystallize().md)
- [depthOfField()](coreimage/cifilter-swift.class/depthoffield().md)
- [edges()](coreimage/cifilter-swift.class/edges().md)
- [edgeWork()](coreimage/cifilter-swift.class/edgework().md)
- [gaborGradients()](coreimage/cifilter-swift.class/gaborgradients().md)
- [gloom()](coreimage/cifilter-swift.class/gloom().md)
- [heightFieldFromMask()](coreimage/cifilter-swift.class/heightfieldfrommask().md)
- [hexagonalPixellate()](coreimage/cifilter-swift.class/hexagonalpixellate().md)
