|
[Objective-C] Capture blurred UIView |
|
 |
#import "UIImage+DSP.h" // https://github.com/gdawg/uiimage-dsp
- (UIImage*)captureView
{
// cattura la screen attuale
UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
[self.layer renderInContext:context];
UIImage *capturedScreen = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return capturedScreen;
}
- (UIImage*)captureBlurredView
{
return [[self captureView] imageByApplyingGaussianBlurOfSize:11 withSigmaSquared:90.0];
}
|
|
|
|
|
|
|
|
Copyright © 1996-2022 Centro Studi Informatica di Danilo Priore. All rights reserved. P.I.10149810581. |
|
|
|