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
Asked
Active
Viewed 438 times
0
-
For a simplistic version, try to make each output pixel a function of the corresponding input pixel and its neighbors out to some radius. For example, some sort of "average" - you can play with the radius and if the average should be weighted by the distance from the subject pixel. – Chris Stratton Apr 02 '14 at 21:20
-
2Did you read the app description? All the code is available at http://code.muzei.co You can find exactly how they did it. – weston Apr 02 '14 at 21:22
-
Maybe this can help: http://stackoverflow.com/questions/1589760/how-do-i-blur-an-image http://stackoverflow.com/questions/19101908/fastest-method-for-blurring-an-image-in-java https://stackoverflow.com/questions/19799451/java-blocking-focus-from-jcomponent – please delete me Apr 02 '14 at 21:24
-
http://trickyandroid.com/advanced-blurring-techniques/ – Pavel Dudka Apr 02 '14 at 21:25
-
Here's the relevant piece in muzei that does the bitmap blurring: https://github.com/romannurik/muzei/blob/master/main/src/main/java/com/google/android/apps/muzei/render/ImageBlurrer.java – James McCracken Apr 02 '14 at 21:25
1 Answers
1
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());

Luis Lavieri
- 4,064
- 6
- 39
- 69
-
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Stephen Apr 02 '14 at 21:49
-
The answer is already accepted, but I'll expand my suggestion anyway if someone is interested. Thanks for the feedback. – Luis Lavieri Apr 02 '14 at 22:35