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

# spotLight()

Highlights a definined area of the image.

## Declaration

```swift
class func spotLight() -> any CIFilter & CISpotLight
```

## Return Value

Return Value The modified image.

## Discussion

Discussion This method applies the spotlight filter to an image. The effect applies a directional spotlight effect to an image while creating a transparent area not highlighted by the spotlight. The spotlight filter uses the following properties: The following code creates a filter that results in only the bottom left of the image becoming visible while the rest of the image gradually becomes transparent: func spotlight(inputImage: CIImage) -> CIImage {     let spotlightFilter = CIFilter.spotLight()     spotlightFilter.inputImage = inputImage     spotlightFilter.lightPointsAt = CIVector(x: 100, y: 100)     spotlightFilter.brightness = 10     spotlightFilter.lightPosition = CIVector(x: 100, y: 100)     spotlightFilter.concentration = 20     return spotlightFilter.outputImage! }

## See Also

### Filters

- [blendWithAlphaMask()](coreimage/cifilter-swift.class/blendwithalphamask().md)
- [blendWithBlueMask()](coreimage/cifilter-swift.class/blendwithbluemask().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)
