Android implements three methods of image blur, Gaussian blur and ground glass effect

A few days ago, I wrote a method of using glide transformations to realize Gaussian blur. Today, I accidentally found another method written by a great God. I feel very good. Share:

design sketch:

Original link: Click to visit

It's also very simple to use. Import dependency and use fuzzy method. Just do it in these two steps

Dependency:

compile

'net.qiujuer.genius:blur:2.0.0-beta4'

There are three implementation methods. The first is implemented in Java, and the second and third are implemented by calling C language. The specific difference is the time-consuming operation time of code execution. It can be seen from the picture that the use time of Java is much longer than that of C.

The ambiguity can be changed by changing the value of radius. The greater the value, the greater the ambiguity. When radius < = 0, the picture will not be displayed; Generally, the value of radius is about 20!

The above is the three methods for Android to realize picture blur, Gaussian blur and ground glass effect introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>