Closed 15130886370 closed 5 years ago
Hello, I can't intercept the image of GPUImageView with this code. Why is this? I can get a blank image, but I can't capture the image rendered by GPUImageVIew. < @IBOutlet private weak var renderView: GPUImageView!
public func capture() -> UIImage? { UIGraphicsBeginImageContextWithOptions(base.bounds.size, false, 0) base.layer.affineTransform() base.layer.render(in: UIGraphicsGetCurrentContext()!) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return image } renderView.capture()
call drawViewHierarchyInRect:afterScreenUpdates: ref: https://developer.apple.com/library/archive/qa/qa1817/_index.html
Hello, I can't intercept the image of GPUImageView with this code. Why is this? I can get a blank image, but I can't capture the image rendered by GPUImageVIew. < @IBOutlet private weak var renderView: GPUImageView!
public func capture() -> UIImage? { UIGraphicsBeginImageContextWithOptions(base.bounds.size, false, 0) base.layer.affineTransform() base.layer.render(in: UIGraphicsGetCurrentContext()!) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return image } renderView.capture()