private static Bitmap getRoundedCornerBitmap(Bitmap bitmapOld, int roundPixel) {
Bitmap output = Bitmap.createBitmap(bitmapOld.getWidth(), bitmapOld.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmapOld.getWidth(), bitmapOld.getHeight());
final RectF rectF = new RectF(rect);
final float roundPx = roundPixelSize;
paint.setAntiAlias(true);
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmapOld, rect, rect, paint);
return output;
}
Fonte: http://debugcodigos.blogspot.com.br/2012/02/para-nunca-mais-esquecer-3-android.html