All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.koushikdutta.ion.bitmap.BitmapInfo Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package com.koushikdutta.ion.bitmap;

import android.graphics.Bitmap;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Point;

import java.io.File;
import java.lang.ref.WeakReference;

/**
 * Created by koush on 6/12/13.
 */
public class BitmapInfo {
    public BitmapInfo(String key, Bitmap[] bitmaps, Point originalSize) {
        this.originalSize = originalSize;
        this.bitmaps = bitmaps;
        this.key = key;
    }

    final public Point originalSize;
    public long loadTime = System.currentTimeMillis();
    public long drawTime;
    final public String key;
    public int loadedFrom;
    final public Bitmap[] bitmaps;
    public int[] delays;
    public Exception exception;
    public BitmapRegionDecoder decoder;

    public int sizeOf() {
        if (bitmaps == null)
            return 0;
        return bitmaps[0].getRowBytes() * bitmaps[0].getHeight() * bitmaps.length;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy