Git Product home page Git Product logo

rxblur's Introduction

#RxBlurDevelopBranch

Overview

在Android设备上,实现一个毛玻璃(高斯模糊)效果总是让人很棘手,不仅要考虑视觉效果,还要在性能和代码实现的复杂度上做出权衡。 这里归纳和总结了几种实现方案(PS: GitHub + StackOverflow + DIY),并且用RxJava进行封装,方便以流的形式处理图片的加载和操作。

Project Structure

  • MainActivity: RxJava + RxBinding + RxViewStub + BestBlur

  • PicassoBlurActivity: RxJava + Picasso + Transformation + RenderScript

  • GlideBlurActivity: RxJava + Glide + Transformation + RenderScript

  • RemoteBlurActivity: RxJava + Retrofit + BestBlur

  • FastBlurActivity: RxJava + Picasso + FastBlur

  • PaintBlurActivity: RxJava + Picasso + PaintBlur

  • RxAnimatorBlurActivity: RxJava + Picasso + Animator(TypeEvaluator)

Summary

把它运行起来,然后看一下高斯效果,这里我还计算了每种模糊算法的所耗时长,方便您的选择,虽然BestBlur在代码的复杂度上很难令人接受,但是在性能表现和模糊效果上还是令人满意的,所以,综合考虑,它是个不错的选择,而且,还可以设置模糊灰度。

如果您对RxJava更感兴趣,可以按照我的实现思路,扩展自己需要的“RxBinding”。

如果,您发现了它的不当之处或者更好地实现思路与方案,请联系我,谢谢。

Developed By

Follow me on Weibo Follow me on imooc Follow me on Jianshu Follow me on imooc

Acknowledgments

rxblur's People

Contributors

smartdengg avatar

Watchers

James Cloos avatar BobJi avatar

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.