package com.jme3.texture.plugins;

import android.graphics.Bitmap;
import com.jme3.asset.AndroidImageInfo;
import com.jme3.asset.AssetInfo;
import com.jme3.asset.AssetLoader;
import com.jme3.texture.Image;
import com.jme3.texture.image.ColorSpace;
import java.io.IOException;

@Deprecated
public class AndroidImageLoader implements AssetLoader {

    public Object load(AssetInfo info) throws IOException {
        AndroidImageInfo imageInfo = new AndroidImageInfo(info);
        Bitmap bitmap = imageInfo.getBitmap();
        
        Image image = new Image(imageInfo.getFormat(), bitmap.getWidth(), bitmap.getHeight(), null, ColorSpace.sRGB);
        
        image.setEfficentData(imageInfo);
        return image;
    }
}
