@@ -0,0 +1,1652 @@
+package io.github.froger.instamaterial;%0A%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.BitmapShader;%0Aimport android.graphics.Canvas;%0Aimport android.graphics.Color;%0Aimport android.graphics.Paint;%0A%0Aimport com.squareup.picasso.Transformation;%0A%0A/**%0A * Created by Miroslaw Stanek on 20.01.15.%0A */%0Apublic class CircleTransformation implements Transformation %7B%0A%0A    private static final int STROKE_WIDTH = 6;%0A%0A    @Override%0A    public Bitmap transform(Bitmap source) %7B%0A        int size = Math.min(source.getWidth(), source.getHeight());%0A%0A        int x = (source.getWidth() - size) / 2;%0A        int y = (source.getHeight() - size) / 2;%0A%0A        Bitmap squaredBitmap = Bitmap.createBitmap(source, x, y, size, size);%0A        if (squaredBitmap != source) %7B%0A            source.recycle();%0A        %7D%0A%0A        Bitmap bitmap = Bitmap.createBitmap(size, size, source.getConfig());%0A%0A        Canvas canvas = new Canvas(bitmap);%0A%0A        Paint avatarPaint = new Paint();%0A        BitmapShader shader = new BitmapShader(squaredBitmap, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP);%0A        avatarPaint.setShader(shader);%0A%0A        Paint outlinePaint = new Paint();%0A        outlinePaint.setColor(Color.WHITE);%0A        outlinePaint.setStyle(Paint.Style.STROKE);%0A        outlinePaint.setStrokeWidth(STROKE_WIDTH);%0A        outlinePaint.setAntiAlias(true);%0A%0A        float r = size / 2f;%0A        canvas.drawCircle(r, r, r, avatarPaint);%0A        canvas.drawCircle(r, r, r - STROKE_WIDTH / 2, outlinePaint);%0A%0A        squaredBitmap.recycle();%0A        return bitmap;%0A    %7D%0A%0A    @Override%0A    public String key() %7B%0A        return %22circleTransformation()%22;%0A    %7D%0A%7D%0A

Add circle transformation for Picasso