// Path: webimageloader/src/main/java/com/webimageloader/util/BitmapUtils.java
// public class BitmapUtils {
//     public static Bitmap.CompressFormat getCompressFormat(String contentType) {
//         if ("image/png".equals(contentType)) {
//             return Bitmap.CompressFormat.PNG;
//         } else if ("image/jpeg".equals(contentType)) {
//             return Bitmap.CompressFormat.JPEG;
//         } else {
//             // Unknown format, use default
//             return Constants.DEFAULT_COMPRESS_FORMAT;
//         }
//     }
// 
//     @TargetApi(14)
//     public static String getContentType(Bitmap.CompressFormat format) {
//         switch (format) {
//             case PNG:
//                 return "image/png";
//             case JPEG:
//                 return "image/jpeg";
//             case WEBP:
//                 return "image/webp";
//             default:
//                 // Unknown format, use default
//                 return getContentType(Constants.DEFAULT_COMPRESS_FORMAT);
//         }
//     }
// 
//     public static Bitmap decodeStream(InputStream is) throws IOException {
//         Bitmap b = BitmapFactory.decodeStream(is);
//         if (b == null) {
//             throw new IOException("Failed to create bitmap, decodeStream() returned null");
//         }
// 
//         return b;
//     }
// 
//     private BitmapUtils() {}
// }
// 
// Path: webimageloader/src/main/java/com/webimageloader/util/InputSupplier.java
// public interface InputSupplier {
//     /**
//      * Get the length of the supplied {@link InputStream}
//      *
//      * @return the length
//      * @throws IOException if opening the stream or file failed
//      */
//     long getLength() throws IOException;
// 
//     /**
//      * Open a new {@link InputStream}, you should be sure to close any previously
//      * opened streams before
//      *
//      * @return a fresh stream which you are responsible for closing
//      * @throws IOException if opening the stream failed
//      */
//     InputStream getInput() throws IOException;
// }


import java.io.IOException;
import java.io.InputStream;
import com.webimageloader.util.BitmapUtils;
import com.webimageloader.util.InputSupplier;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
package com.webimageloader.transformation;




/**
 * Adapter class to use if you don't need the {@link InputStream} provided by
 * the base {@link Transformation} class.
 *
 * @author Alexander Blom <alexanderblom.se>
 */
public abstract class SimpleTransformation implements Transformation {
    /**
     * {@inheritDoc}
     *
     * @return null, meaning use default format
     */
    @Override
    public CompressFormat getCompressFormat() {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
// Path: webimageloader/src/main/java/com/webimageloader/util/BitmapUtils.java
// public class BitmapUtils {
//     public static Bitmap.CompressFormat getCompressFormat(String contentType) {
//         if ("image/png".equals(contentType)) {
//             return Bitmap.CompressFormat.PNG;
//         } else if ("image/jpeg".equals(contentType)) {
//             return Bitmap.CompressFormat.JPEG;
//         } else {
//             // Unknown format, use default
//             return Constants.DEFAULT_COMPRESS_FORMAT;
//         }
//     }
// 
//     @TargetApi(14)
//     public static String getContentType(Bitmap.CompressFormat format) {
//         switch (format) {
//             case PNG:
//                 return "image/png";
//             case JPEG:
//                 return "image/jpeg";
//             case WEBP:
//                 return "image/webp";
//             default:
//                 // Unknown format, use default
//                 return getContentType(Constants.DEFAULT_COMPRESS_FORMAT);
//         }
//     }
// 
//     public static Bitmap decodeStream(InputStream is) throws IOException {
//         Bitmap b = BitmapFactory.decodeStream(is);
//         if (b == null) {
//             throw new IOException("Failed to create bitmap, decodeStream() returned null");
//         }
// 
//         return b;
//     }
// 
//     private BitmapUtils() {}
// }
// 
// Path: webimageloader/src/main/java/com/webimageloader/util/InputSupplier.java
// public interface InputSupplier {
//     /**
//      * Get the length of the supplied {@link InputStream}
//      *
//      * @return the length
//      * @throws IOException if opening the stream or file failed
//      */
//     long getLength() throws IOException;
// 
//     /**
//      * Open a new {@link InputStream}, you should be sure to close any previously
//      * opened streams before
//      *
//      * @return a fresh stream which you are responsible for closing
//      * @throws IOException if opening the stream failed
//      */
//     InputStream getInput() throws IOException;
// }


// Path: webimageloader/src/main/java/com/webimageloader/transformation/SimpleTransformation.java
import java.io.IOException;
import java.io.InputStream;
import com.webimageloader.util.BitmapUtils;
import com.webimageloader.util.InputSupplier;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;

package com.webimageloader.transformation;




/**
 * Adapter class to use if you don't need the {@link InputStream} provided by
 * the base {@link Transformation} class.
 *
 * @author Alexander Blom <alexanderblom.se>
 */
public abstract class SimpleTransformation implements Transformation {
    /**
     * {@inheritDoc}
     *
     * @return null, meaning use default format
     */
    @Override
    public CompressFormat getCompressFormat() {
        return null;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Bitmap transform(InputSupplier input) throws IOException {