Android Utililty Methods Bitmap Corner Round

List of utility methods to do Bitmap Corner Round

Description

The list of methods to do Bitmap Corner Round are organized into topic(s).

Method

BitmapgetRoundedCornerBitmap(Bitmap bitmap)
get Rounded Corner Bitmap
int w = bitmap.getWidth();
int h = bitmap.getHeight();
Bitmap output = Bitmap.createBitmap(w, h, Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, w, h);
final RectF rectF = new RectF(rect);
...
BitmapgetRoundedCornerBitmap(Bitmap bitmap, float roundPx)
get Rounded Corner Bitmap
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
        bitmap.getHeight());
final RectF rectF = new RectF(rect);
...
BitmapgetRoundedCornerBitmap(Bitmap bitmap, int dp, Context context)
get Rounded Corner Bitmap
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
        bitmap.getHeight());
final RectF rectF = new RectF(rect);
...
BitmaproundCornersRGB888(Bitmap src, int roundPixles)
Return a bitmap identical to src with rounded corners.
final Bitmap output = Bitmap.createBitmap(src.getWidth(),
        src.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, src.getWidth(), src.getHeight());
final RectF rectF = new RectF(rect);
paint.setAntiAlias(true);
...
BitmapgetRoundedCornerBitmap(Context context, Bitmap bitmap, Boolean create_circle)
Gets the rounded corner bitmap.
DisplayMetrics mMetrics = context.getResources()
        .getDisplayMetrics();
float mScaleFactor = mMetrics.density;
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = Color.BLACK;
final Paint paint = new Paint();
...
BitmapgetRoundedCornerBitmap(Bitmap bitmap)
Gets the rounded corner bitmap.
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
        bitmap.getHeight());
final RectF rectF = new RectF(rect);
...
BitmapgetRoundedCornerBitmap(Bitmap bitmap, float roundPx)
get Rounded Corner Bitmap
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
        bitmap.getHeight());
final RectF rectF = new RectF(rect);
...
BitmapgetRoundedCornerBitmap(Bitmap bitmap, int roundPx)
get Rounded Corner Bitmap
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
        bitmap.getHeight());
final RectF rectF = new RectF(rect);
...
BitmapgetRoundBitmapFromUrl(String url, int pixels)
get Round Bitmap From Url
byte[] bytes = getBytesFromUrl(url);
Bitmap bitmap = byteToBitmap(bytes);
return toRoundCorner(bitmap, pixels);
BitmaptoRoundCorner(Bitmap bitmap, int pixels)
to Round Corner
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
        bitmap.getHeight(), Config.ARGB_8888);
Canvas canvas = new Canvas(output);
final int color = 0xff424242;
final Paint paint = new Paint();
final Rect rect = new Rect(0, 0, bitmap.getWidth(),
        bitmap.getHeight());
final RectF rectF = new RectF(rect);
...