Giter Site home page Giter Site logo

blur-lib's Introduction

高斯模糊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://raw.githubusercontent.com/Android-Mainli/Maven/master" }
        }
    }
    //在项目module中添加依赖
    implementation 'com.mainli:blur:1.0.0'
    
  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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.