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

# starShineGenerator()

Generates a star-shine image.

## Declaration

```swift
class func starShineGenerator() -> any CIFilter & CIStarShineGenerator
```

## Return Value

Return Value The generated image.

## Discussion

Discussion This method generates a star-shine image. The effect is similar to a supernova effect. You can use this filter to simulate a lens flare. The star-shine generator filter uses the following properties: The following code generates a star-shaped silhouette with a black background. func starShine() -> CIImage {     let starShineGenerator = CIFilter.starShineGenerator()     starShineGenerator.center = CGPoint(x: 150, y: 150)     starShineGenerator.color = .green     starShineGenerator.radius = 50     starShineGenerator.crossScale = 15     starShineGenerator.crossAngle = 0.60     starShineGenerator.crossOpacity = -2     starShineGenerator.crossWidth = 2.5     starShineGenerator.epsilon = -2.0     return starShineGenerator.outputImage! }

## See Also

### Filters

- [attributedTextImageGenerator()](coreimage/cifilter-swift.class/attributedtextimagegenerator().md)
- [aztecCodeGenerator()](coreimage/cifilter-swift.class/azteccodegenerator().md)
- [barcodeGenerator()](coreimage/cifilter-swift.class/barcodegenerator().md)
- [blurredRectangleGenerator()](coreimage/cifilter-swift.class/blurredrectanglegenerator().md)
- [checkerboardGenerator()](coreimage/cifilter-swift.class/checkerboardgenerator().md)
- [code128BarcodeGenerator()](coreimage/cifilter-swift.class/code128barcodegenerator().md)
- [lenticularHaloGenerator()](coreimage/cifilter-swift.class/lenticularhalogenerator().md)
- [meshGenerator()](coreimage/cifilter-swift.class/meshgenerator().md)
- [pdf417BarcodeGenerator()](coreimage/cifilter-swift.class/pdf417barcodegenerator().md)
- [qrCodeGenerator()](coreimage/cifilter-swift.class/qrcodegenerator().md)
- [randomGenerator()](coreimage/cifilter-swift.class/randomgenerator().md)
- [roundedRectangleGenerator()](coreimage/cifilter-swift.class/roundedrectanglegenerator().md)
- [roundedRectangleStrokeGenerator()](coreimage/cifilter-swift.class/roundedrectanglestrokegenerator().md)
- [stripesGenerator()](coreimage/cifilter-swift.class/stripesgenerator().md)
- [sunbeamsGenerator()](coreimage/cifilter-swift.class/sunbeamsgenerator().md)
