Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement