// Path: webimageloader/src/main/java/com/webimageloader/Constants.java
// public class Constants {
//     public static final int DEFAULT_CONNECTION_TIMEOUT = 10 * 1000; // 10 sec
//     public static final int DEFAULT_READ_TIMEOUT = 15 * 1000; // 15 sec
//     public static final long DEFAULT_MAX_AGE = 3 * 24 * 60 * 60 * 1000; // Three days
//     public static final long MAX_AGE_INFINITY = 0;
//     public static final long MAX_AGE_NOT_FORCED = -1;
// 
//     public static final int DEFAULT_DISK_THREADS = 1;
//     public static final int DEFAULT_NETWORK_THREADS = 2;
// 
//     public static final Bitmap.CompressFormat DEFAULT_COMPRESS_FORMAT = Bitmap.CompressFormat.JPEG;
//     public static final int DEFAULT_COMPRESS_QUALITY = 75;
// 
//     private Constants() {}
// }


import java.io.IOException;
import java.io.InputStream;
import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import com.webimageloader.Constants;
package com.webimageloader.util;




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
// Path: webimageloader/src/main/java/com/webimageloader/Constants.java
// public class Constants {
//     public static final int DEFAULT_CONNECTION_TIMEOUT = 10 * 1000; // 10 sec
//     public static final int DEFAULT_READ_TIMEOUT = 15 * 1000; // 15 sec
//     public static final long DEFAULT_MAX_AGE = 3 * 24 * 60 * 60 * 1000; // Three days
//     public static final long MAX_AGE_INFINITY = 0;
//     public static final long MAX_AGE_NOT_FORCED = -1;
// 
//     public static final int DEFAULT_DISK_THREADS = 1;
//     public static final int DEFAULT_NETWORK_THREADS = 2;
// 
//     public static final Bitmap.CompressFormat DEFAULT_COMPRESS_FORMAT = Bitmap.CompressFormat.JPEG;
//     public static final int DEFAULT_COMPRESS_QUALITY = 75;
// 
//     private Constants() {}
// }


// Path: webimageloader/src/main/java/com/webimageloader/util/BitmapUtils.java
import java.io.IOException;
import java.io.InputStream;
import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import com.webimageloader.Constants;

package com.webimageloader.util;




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);