光模糊效果? [英] A light blur effect?

查看:37
本文介绍了光模糊效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个光模糊效果,你仍然可以以某种方式识别图像,甚至调整它.

我以前用过苹果的:

UIVisualEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];alphaView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];

这不是真正的轻",但非常强烈,所以你再也看不到图像了.

我宁愿不使用外部 3rd 类,因为根据我的经验,它们变得有问题.

我还记得 Apple 曾经有一个名为:UIIMAGE+BLUR 的类,在 UIVisualEffectView 之前,它可以让您调整事物.它是否仍然有效并被 App Store 接受?

解决方案

我知道还有另外两个选项.

一个是使用Accelerate框架,手动完成(我觉得这就是你指的UIIMAGE+BLUE):https://developer.apple.com/library/ios/samplecode/UIImageEffects/Introduction/Intro.html>

更简单的选择是使用 CoreImage 的高斯模糊.这里的问题中有一些示例代码:CIGaussianBlur image size

I would like to get a light blur effect , in which you still can somehow recognise the image, or even adjust it .

I used to have the Apple one :

UIVisualEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight];
alphaView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];

Which is not really "light" , but is very strong so you cant see the image anymore.

I would rather not using external 3rd classes, because from my experience they turned to be problematic.

I also remember Apple used to have a class called : UIIMAGE+BLUR, before the UIVisualEffectView which let you adjust things. Is it still valid and acceptable by the App Store ?

解决方案

There's two other options I know of.

One is to use the Accelerate framework and do it manually (I think this is the UIIMAGE+BLUE you refer to): https://developer.apple.com/library/ios/samplecode/UIImageEffects/Introduction/Intro.html

The easier option is to use CoreImage's Gaussian Blur. There's some sample code in the Question here: CIGaussianBlur image size

这篇关于光模糊效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆