Android Development-Blur a picture (frosted glass effect, blurry)

Source: Internet
Author: User
Overview

Ipad,iphone the Blur effect on the first page background is not very nice, then how to do it in Android. I have achieved this effect in a way.

Open Source Library Name: Anroid-image-blur

An auxiliary class library for blurring images under Android

GitHub Address

Https://github.com/vir56k/anroid-image-blur

Noun Explanation:

Bokeh, blurring, or frosted glass effects. That is, a picture is blurred, become virtual, similar to the virtual when the picture is seen. In an iOS system, the background behind the boot of the main system is the effect of a blur. Give people a sense of immersion, background and content are related.

Introduced

Create a new image by making a picture virtual.

Original image: After Blur:

Methods for referencing a class library:
  1. Download Androidimageblur source code library,
  2. Reference the class library in your project
Code
//缩放并显示Bitmap newImg = BlurUtil.doBlur(img1, 20, 10);

Enter a bitmap bitmap by Blurutil's Doblur method, which returns a bitmap after the blur.

方法名: BlurUtil.doBlur(...)参数:   第一个参数 img1, 是原始的位图图像,        第二个参数 20 , 是缩放的大小,这个数字约大,虚化程度越高        第三个参数 10, 虚化质量,这个数字约大,虚化程度越高返回值: 返回一个 虚化(模糊)后的位图

Android Development-Blur a picture (frosted glass effect, blurry)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.