Br4infreze
Br4infreze

Reputation: 373

How to blur an image

I'm wondering if that is possible to blur a bitmap or a drawable. Like the app muzei is doing.is it possible ? ive tried to use some image effects class ive found but they were helpless... thanks to the helpers

Upvotes: 0

Views: 445

Answers (1)

Luis Lavieri
Luis Lavieri

Reputation: 4129

Yes. It is possible. Try Android StackBlur library.

According to its documentation, to use this library, you must do the following:

First initialize your StackBlurManager to load a sample image:

_stackBlurManager = new StackBlurManager(getBitmapFromAsset(this, "android_platform_256.png"));

Process using a certain radius with the following line:

_stackBlurManager.process(progress*5);

and finally obtain the image and load it into an ImageView or any other component:

_imageView.setImageBitmap(_stackBlurManager.returnBlurredImage());

Upvotes: 1

Related Questions