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

# attributedTextImageGenerator()

Generates an attributed-text image.

## Declaration

```swift
class func attributedTextImageGenerator() -> any CIFilter & CIAttributedTextImageGenerator
```

## Return Value

Return Value The generated image.

## Discussion

Discussion This method generates an attributed-text image. The effect takes the input string property and the scale factor to scale up the text. You commonly combine this filter with other filters to create a watermark on images. The attributed-text image generator filter uses the following properties: The following code creates a filter that generates an attributed-text image: func attributedTextImage() -> CIImage {     let attributedTextImageFilter = CIFilter.attributedTextImageGenerator()     attributedTextImageFilter.text = NSAttributedString(string: "Hello world! 👋")     attributedTextImageFilter.scaleFactor = 10     attributedTextImageFilter.padding = 5     return attributedTextImageFilter.outputImage! }

## See Also

### Filters

- [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)
- [starShineGenerator()](coreimage/cifilter-swift.class/starshinegenerator().md)
- [stripesGenerator()](coreimage/cifilter-swift.class/stripesgenerator().md)
- [sunbeamsGenerator()](coreimage/cifilter-swift.class/sunbeamsgenerator().md)
