以前自己写过一个高斯模糊的工具类,是把bitmap进行处理,最近要用结果找不到了,写起来有麻烦,还好现在有相关开源框架,特此记录一下。
使用方法
Adding to project
Add dependencies in your build.gradle
:
dependencies {
implementation 'com.github.mmin18:realtimeblurview:1.2.1'
}
Support API level < 19
The following step is only required if your minSdkVersion < 19, or you use renderscript support mode.
Both AndroidX and Android Support Library is supported.
android {
buildToolsVersion '24.0.2' // Use 23.0.3 or higher
defaultConfig {
minSdkVersion 15
renderscriptTargetApi 19
renderscriptSupportModeEnabled true // Enable RS support
}
}
Add proguard rules if necessary:
-keep class android.support.v8.ren