1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/thirdparty/com/squareup/picasso/Transformation.java Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* 1.5 + * Copyright (C) 2013 Square, Inc. 1.6 + * 1.7 + * Licensed under the Apache License, Version 2.0 (the "License"); 1.8 + * you may not use this file except in compliance with the License. 1.9 + * You may obtain a copy of the License at 1.10 + * 1.11 + * http://www.apache.org/licenses/LICENSE-2.0 1.12 + * 1.13 + * Unless required by applicable law or agreed to in writing, software 1.14 + * distributed under the License is distributed on an "AS IS" BASIS, 1.15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1.16 + * See the License for the specific language governing permissions and 1.17 + * limitations under the License. 1.18 + */ 1.19 +package com.squareup.picasso; 1.20 + 1.21 +import android.graphics.Bitmap; 1.22 + 1.23 +/** Image transformation. */ 1.24 +public interface Transformation { 1.25 + /** 1.26 + * Transform the source bitmap into a new bitmap. If you create a new bitmap instance, you must 1.27 + * call {@link android.graphics.Bitmap#recycle()} on {@code source}. You may return the original 1.28 + * if no transformation is required. 1.29 + */ 1.30 + Bitmap transform(Bitmap source); 1.31 + 1.32 + /** 1.33 + * Returns a unique key for the transformation, used for caching purposes. If the transformation 1.34 + * has parameters (e.g. size, scale factor, etc) then these should be part of the key. 1.35 + */ 1.36 + String key(); 1.37 +}