public static Bitmap getBubbleBitmap(Bitmap scaleBitmapImage, int targetWidth, int targetHeight) {
// int targetWidth = 400;
// int targetHeight = 400;
Bitmap targetBitmap = Bitmap.createBitmap(targetWidth, targetHeight, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(targetBitmap);
Path path = new Path();
path.moveTo((float) targetWidth/2, (float) 0.0);
path.lineTo(targetWidth, (float) 0.0);
path.lineTo((float)targetWidth, targetHeight/2);
RectF oval = new RectF();
oval.set(0, 0, targetWidth, targetHeight);
path.addArc(oval, 0, 270);
canvas.clipPath(path);
Bitmap sourceBitmap = scaleBitmapImage;
canvas.drawBitmap(sourceBitmap, new Rect(0, 0, sourceBitmap.getWidth(),
sourceBitmap.getHeight()), new Rect(0, 0, targetWidth,
targetHeight), null);
return targetBitmap;
}