List of utility methods to do Bitmap Corner Round
Bitmap | getRoundedCornerBitmap(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); ... |
Bitmap | getRoundedCornerBitmap(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); ... |
Bitmap | getRoundedCornerBitmap(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); ... |
Bitmap | roundCornersRGB888(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); ... |
Bitmap | getRoundedCornerBitmap(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(); ... |
Bitmap | getRoundedCornerBitmap(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); ... |
Bitmap | getRoundedCornerBitmap(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); ... |
Bitmap | getRoundedCornerBitmap(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); ... |
Bitmap | getRoundBitmapFromUrl(String url, int pixels) get Round Bitmap From Url byte[] bytes = getBytesFromUrl(url); Bitmap bitmap = byteToBitmap(bytes); return toRoundCorner(bitmap, pixels); |
Bitmap | toRoundCorner(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); ... |