Skip to content

🎩 An easy and fast library to apply gaussian blur filter on any images.

License

Notifications You must be signed in to change notification settings

jrvansuita/GaussianBlur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Arsenal

GaussianBlur

A easy and simple library to apply Gaussian blur on images.

Porpouse

This class lets you apply a fast Gaussian Blur on any images. A larger image will be scaled down to take menus time to apply the filter. You can also do it asynchronous or synchronous.

Usage

Step 1. Add the JitPack repository to your build file:

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Step 2. Add the dependency

dependencies {
        compile 'com.github.jrvansuita:GaussianBlur:v1.0.0'
}

Samples

You can take a look at the sample app located on this project.

Implementation

//Synchronous
Bitmap blurredBitmap = GaussianBlur.with(context).radius(25).noScaleDown(true).render(R.mipmap.your_image);
imageView.setImageBitmap(blurredBitmap);

//Synchronous - Only scaleDown
Bitmap scaledDownBitmap = GaussianBlur.with(context).maxSixe(50).scaleDown(R.mipmap.your_image);
imageView.setImageBitmap(scaledDownBitmap);

//Asynchronous
GaussianBlur.with(context).maxSixe(400).radius(25).put(R.mipmap.your_image, imageView);