// Path: webimageloader/src/main/java/com/webimageloader/ImageLoader.java
// public static class Logger {
//     public static boolean DEBUG = false;
//     public static boolean VERBOSE = false;
// 
//     /**
//      * Log both debug and verbose messages
//      */
//     public static void logAll() {
//         DEBUG = true;
//         VERBOSE = true;
//     }
// 
//     private Logger() {}
// }
// 
// Path: webimageloader/src/main/java/com/webimageloader/transformation/Transformation.java
// 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);
// }
// 
// 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 android.graphics.Bitmap;
import android.util.Log;
import com.webimageloader.ImageLoader.Logger;
import com.webimageloader.transformation.Transformation;
import com.webimageloader.util.BitmapUtils;
import com.webimageloader.util.InputSupplier;
import java.io.IOException;
                    manager.deliverError(e);
                }
            }

            @Override
            public void onBitmapLoaded(Bitmap b, Metadata metadata) {
                b = transformation.transform(b);
                deliverResult(b, metadata);
            }

            private void deliverResult(Bitmap b, Metadata metadata) {
                if (b == null) {
                    onError(new IllegalStateException("Transformer returned null"));
                } else {
                    manager.deliverBitmap(b, metadata);
                }
            }

            @Override
            public void onNotModified(Metadata metadata) {
                manager.deliverNotMotified(metadata);
            }

            @Override
            public void onError(Throwable t) {
                manager.deliverError(t);
            }
        });
    }

// Path: webimageloader/src/main/java/com/webimageloader/ImageLoader.java
// public static class Logger {
//     public static boolean DEBUG = false;
//     public static boolean VERBOSE = false;
// 
//     /**
//      * Log both debug and verbose messages
//      */
//     public static void logAll() {
//         DEBUG = true;
//         VERBOSE = true;
//     }
// 
//     private Logger() {}
// }
// 
// Path: webimageloader/src/main/java/com/webimageloader/transformation/Transformation.java
// 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);
// }
// 
// 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/loader/TransformingLoader.java
import android.graphics.Bitmap;
import android.util.Log;
import com.webimageloader.ImageLoader.Logger;
import com.webimageloader.transformation.Transformation;
import com.webimageloader.util.BitmapUtils;
import com.webimageloader.util.InputSupplier;
import java.io.IOException;

                    manager.deliverError(e);
                }
            }

            @Override
            public void onBitmapLoaded(Bitmap b, Metadata metadata) {
                b = transformation.transform(b);
                deliverResult(b, metadata);
            }

            private void deliverResult(Bitmap b, Metadata metadata) {
                if (b == null) {
                    onError(new IllegalStateException("Transformer returned null"));
                } else {
                    manager.deliverBitmap(b, metadata);
                }
            }

            @Override
            public void onNotModified(Metadata metadata) {
                manager.deliverNotMotified(metadata);
            }

            @Override
            public void onError(Throwable t) {
                manager.deliverError(t);
            }
        });
    }

    private Metadata getTransformedMetadata(Metadata metadata, Transformation transformation) {