Java/Android class to create blur on image
package com.example.saka.moviepreview; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.drawable.BitmapDrawable; import android.os.Build; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.ScriptIntrinsicBlur; import android.util.Log; import android.view.View; /** * Created by saka on 11/1/18. */ public class BlurEffect { //-------- blur effect -------- // Bitmap bm_default_background = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.default_background); //// int width = Math.round(bm_default_background.getWidth() * 0.2f); int height = Math.round(bm_default_background.getHeight() * 0.2f); //// bm_default_background = Bitmap.createScaledBitmap(bm_default_background, width, height, false); // Bitmap ...