Lines Matching refs:Bitmap
19 import android.graphics.Bitmap;
55 * Creates a blurred version of the given Bitmap.
57 * @param bitmap the input bitmap, presumably a 96x96 pixel contact
60 public static Bitmap createBlurredBitmap(Bitmap bitmap) {
63 if (bitmap == null) {
64 Log.w(TAG, "createBlurredBitmap: null bitmap");
68 if (DBG) log("- input bitmap: " + bitmap.getWidth() + " x " + bitmap.getHeight());
70 // The bitmap we pass to gaussianBlur() needs to have a width
73 bitmap = Bitmap.createScaledBitmap(bitmap,
76 if (DBG) log("- after resize: " + bitmap.getWidth() + " x " + bitmap.getHeight());
78 bitmap = gaussianBlur(bitmap);
79 if (DBG) log("- after blur: " + bitmap.getWidth() + " x " + bitmap.getHeight());
83 return bitmap;
87 * Apply a gaussian blur filter, and return a new (blurred) bitmap
88 * that's the same size as the input bitmap.
90 * @param source input bitmap, whose width must be a power of 2
92 public static Bitmap gaussianBlur(Bitmap source) {
115 // Return a bitmap scaled to the desired size.
116 Bitmap filtered = Bitmap.createBitmap(in, width, height, Bitmap.Config.ARGB_8888);