@@ -0,0 +1,1588 @@
+package com.github.pedrovgs.nox.transformation;%0A%0Aimport android.content.Context;%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.BitmapShader;%0Aimport android.graphics.Canvas;%0Aimport android.graphics.Paint;%0Aimport com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;%0Aimport com.bumptech.glide.load.resource.bitmap.BitmapTransformation;%0A%0Apublic class CircularTransformation extends BitmapTransformation %7B%0A  private Context context;%0A%0A  public CircularTransformation(Context context) %7B%0A    super(context);%0A    this.context = context;%0A  %7D%0A%0A  @Override%0A  protected Bitmap transform(BitmapPool pool, Bitmap source, int outWidth, int outHeight) %7B%0A    return getCircularBitmapImage(source);%0A  %7D%0A%0A  @Override public String getId() %7B%0A    return %22Glide_Circle_Transformation%22;%0A  %7D%0A%0A  public static Bitmap getCircularBitmapImage(Bitmap source) %7B%0A    int size = Math.min(source.getWidth(), source.getHeight());%0A    int x = (source.getWidth() - size) / 2;%0A    int y = (source.getHeight() - size) / 2;%0A    Bitmap squaredBitmap = Bitmap.createBitmap(source, x, y, size, size);%0A    if (squaredBitmap != source) %7B%0A      source.recycle();%0A    %7D%0A    Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);%0A    Canvas canvas = new Canvas(bitmap);%0A    Paint paint = new Paint();%0A    BitmapShader shader =%0A        new BitmapShader(squaredBitmap, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP);%0A    paint.setShader(shader);%0A    paint.setAntiAlias(true);%0A    float r = size / 2f;%0A    canvas.drawCircle(r, r, r, paint);%0A    squaredBitmap.recycle();%0A    return bitmap;%0A  %7D%0A%7D

Add CircularTransformation to glide