1 package com.jme3.texture.plugins; 2 3 import android.graphics.Bitmap; 4 import com.jme3.asset.AndroidImageInfo; 5 import com.jme3.asset.AssetInfo; 6 import com.jme3.asset.AssetLoader; 7 import com.jme3.texture.Image; 8 import java.io.IOException; 9 10 public class AndroidImageLoader implements AssetLoader { 11 12 public Object load(AssetInfo info) throws IOException { 13 AndroidImageInfo imageInfo = new AndroidImageInfo(info); 14 Bitmap bitmap = imageInfo.getBitmap(); 15 16 Image image = new Image(imageInfo.getFormat(), bitmap.getWidth(), bitmap.getHeight(), null); 17 image.setEfficentData(imageInfo); 18 return image; 19 } 20 } 21