Skip to content

Android-Mainli/blur

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

高斯模糊Bitmap

动画

算法使用的是intel的**IIR**

效率

效率还是蛮快的(release版so库)

  1. 测试设备选用Nexus 6P(CPU:骁龙810 , RAM:3G)
  2. 测试图片选用800x991分辨率
强度 用间(ms)
5 101
10 103
15 105
20 96
25 101

debug包中模糊效率稍慢,请使用release包测试

用法

  1. 依赖

    //在项目根目录中添加maven地址
    allprojects {
        repositories {
            maven { url 'https://jitpack.io' }
        }
    }
    //在项目module中添加依赖
    implementation 'com.mainli:blur:1.0.1'
    
  2. 减少依赖so库数量,默认aar中添加有'armeabi', 'armeabi-v7a', 'arm64-v8a', 'mips', 'mips64', 'x86', 'x86_64'.

在app的build.gradleandroid下的defaultConfig中加入ndk标签标明支持的平台版本,以减少依赖的so数量

android {
  	省略...
  defaultConfig {
	省略...
      ndk {
		//可选 可只是用'armeabi-v7a'
          abiFilters 'armeabi','armeabi-v7a','arm64-v8a'
      }
      省略...
  }
  1. code中使用
	//blur方法默认修改bitmap中数据,调用完成功后(btm == bitmap 二者为同一对象)
	 Bitmap btm = BitmapBlur.blur(bitmap, intensity)

About

Android 高斯模糊 快速模糊bitmap,快到主线程直接使用(800x991分辨率,1/10秒左右)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published