@@ -0,0 +1,2090 @@
+package jp.wasabeef.picasso.transformations;%0A%0A/**%0A * Copyright (C) 2015 Wasabeef%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Aimport com.squareup.picasso.Transformation;%0A%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.Canvas;%0Aimport android.graphics.RectF;%0A%0Apublic class CropTopTransformation implements Transformation %7B%0A%0A    private int mWidth;%0A    private int mHeight;%0A%0A    public CropTopTransformation() %7B%0A    %7D%0A%0A    public CropTopTransformation(int width, int height) %7B%0A        mWidth = width;%0A        mHeight = height;%0A    %7D%0A%0A    @Override%0A    public Bitmap transform(Bitmap source) %7B%0A        if (mWidth == 0) %7B%0A            mWidth = source.getWidth();%0A        %7D%0A        if (mHeight == 0) %7B%0A            mHeight = source.getHeight();%0A        %7D%0A%0A        float scaleX = (float) mWidth / source.getWidth();%0A        float scaleY = (float) mHeight / source.getHeight();%0A        float scale = Math.max(scaleX, scaleY);%0A%0A        float scaledWidth = scale * source.getWidth();%0A        float scaledHeight = scale * source.getHeight();%0A        float left = (mWidth - scaledWidth) / 2;%0A        float top = 0;%0A        RectF targetRect = new RectF(left, top, left + scaledWidth, top + scaledHeight);%0A%0A        Bitmap bitmap = Bitmap.createBitmap(mWidth, mHeight, source.getConfig());%0A        Canvas canvas = new Canvas(bitmap);%0A        canvas.drawBitmap(source, null, targetRect, null);%0A        source.recycle();%0A%0A        return bitmap;%0A    %7D%0A%0A    @Override%0A    public String key() %7B%0A        return %22CropTopTransformation(width=%22 + mWidth + %22, height=%22 + mHeight + %22)%22;%0A    %7D%0A%7D%0A

Create CropTopTransformation.java