Back to project page webimageloader.
The source code is released under:
Apache License
If you think the Android project webimageloader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.webimageloader.transformation; /* w w w . j a v a 2 s . c o m*/ import java.io.IOException; import com.webimageloader.util.InputSupplier; import android.graphics.Bitmap; /** * Transformation to apply to an image while loading it * @author Alexander Blom <alexanderblom.se> */ public interface Transformation { /** * Get the identified for this transformation. It should be unique and include any * Parameters passed to this transformation. * * @return the identifier */ String getIdentifier(); /** * Get the format used when saving the result of this transformation. This * can be useful for example when relying on alpha. * * @return the bitmap compress format, null for default */ Bitmap.CompressFormat getCompressFormat(); /** * Transform this {@link InputSupplier} to a {@link Bitmap}. * * @param input original {@link InputSupplier} * @return transformed {@link Bitmap} * @throws IOException if the conversion failed */ Bitmap transform(InputSupplier input) throws IOException; /** * Transform this {@link Bitmap} to a new {@link Bitmap}. * * @param b original {@link Bitmap} * @return transformed {@link Bitmap} */ Bitmap transform(Bitmap b); }