1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-10-04 18:03:21 +08:00

Refactor: Comments

This commit is contained in:
wasabeef
2015-01-20 23:36:25 +09:00
parent 5775d8211c
commit d474911010
2 changed files with 1 additions and 4 deletions

View File

@@ -53,14 +53,11 @@ public class BlurTransformation implements Transformation<Bitmap> {
Bitmap source = resource.get();
if (Build.VERSION.SDK_INT > 16) {
//recreate new bitmap based on source bitmap
Bitmap outBitmap = Bitmap.createBitmap(source.getWidth(), source.getHeight(),
Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(outBitmap);
canvas.drawBitmap(source, 0, 0, null);
//apply blur effect on image
RenderScript rs = RenderScript.create(mContext);
Allocation overlayAlloc = Allocation.createFromBitmap(rs, outBitmap);
ScriptIntrinsicBlur blur = ScriptIntrinsicBlur.create(rs, overlayAlloc.getElement());