1
0
mirror of https://github.com/wasabeef/glide-transformations.git synced 2025-06-09 16:14:09 +08:00
This commit is contained in:
wasabeef 2015-02-04 00:54:22 +09:00
parent 1534573e8f
commit 07b7d24e13

View File

@ -43,9 +43,9 @@ public class CropCircleTransformation implements Transformation<Bitmap> {
int width = (source.getWidth() - size) / 2; int width = (source.getWidth() - size) / 2;
int height = (source.getHeight() - size) / 2; int height = (source.getHeight() - size) / 2;
Bitmap bitmap = mBitmapPool.get(width, height, source.getConfig()); Bitmap bitmap = mBitmapPool.get(size, size, source.getConfig());
if (bitmap == null) { if (bitmap == null) {
bitmap = Bitmap.createBitmap(width, height, source.getConfig()); bitmap = Bitmap.createBitmap(size, size, source.getConfig());
} }
Canvas canvas = new Canvas(bitmap); Canvas canvas = new Canvas(bitmap);