This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func share(){ | |
let rect = CGRect(origin: .zero, size: CGSize(width: 480, height: 480)) | |
let filter = CIFilter.textImageGenerator() | |
filter.text = "Test Image" | |
filter.fontSize = 80 | |
var ciImage = filter.outputImage! | |
ciImage = ciImage.transformed(by: CGAffineTransform(translationX: 45.5, y: 193)) | |
ciImage = ciImage.composited(over: CIImage.white.cropped(to: rect)) | |
let sRGBContext = CIContext(options: nil) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.