package com.bumptech.glide.load; import com.bumptech.glide.load.engine.Resource; /** * A class for performing an arbitrary transformation on a bitmap * @param The type of the resource being transformed. */ public interface Transformation { /** * Transform the given bitmap. It is also acceptable to simply return the given bitmap if no transformation is * required. * * @param resource The resource to transform * @param outWidth The width of the view or target the bitmap will be displayed in * @param outHeight The height of the view or target the bitmap will be displayed in * @return The transformed bitmap */ public abstract Resource transform(Resource resource, int outWidth, int outHeight); /** * A method to get a unique identifier for this particular transformation that can be used as part of a cache key. * The fully qualified class name for this class is appropriate if written out, but getClass().getName() is not * because the name may be changed by proguard. * * @return A string that uniquely identifies this transformation from other transformations */ public String getId(); }