[Android] Make blur radius a parameter
Geoffrey Métais
git at videolan.org
Thu Jun 15 14:59:46 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun 15 14:56:31 2017 +0200| [da87ea58dea6011cee5e555a9a09b7b39aef7e38] | committer: Geoffrey Métais
Make blur radius a parameter
> https://code.videolan.org/videolan/vlc-android/commit/da87ea58dea6011cee5e555a9a09b7b39aef7e38
---
vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
index a14c3428e..33a891ed6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
@@ -279,6 +279,11 @@ public class UiTools {
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
public static Bitmap blurBitmap(Bitmap bitmap) {
+ return blurBitmap(bitmap, 15.0f);
+ }
+
+ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
+ public static Bitmap blurBitmap(Bitmap bitmap, float radius) {
if (bitmap == null || bitmap.getConfig() == null)
return null;
@@ -297,7 +302,7 @@ public class UiTools {
Allocation allOut = Allocation.createFromBitmap(rs, outBitmap);
//Set the radius of the blur
- blurScript.setRadius(15.f);
+ blurScript.setRadius(radius);
//Perform the Renderscript
blurScript.setInput(allIn);
More information about the Android
mailing list