|
|
@ -5,6 +5,7 @@ import com.jme3.asset.AndroidImageInfo; |
|
|
|
import com.jme3.asset.AssetInfo; |
|
|
|
import com.jme3.asset.AssetInfo; |
|
|
|
import com.jme3.asset.AssetLoader; |
|
|
|
import com.jme3.asset.AssetLoader; |
|
|
|
import com.jme3.texture.Image; |
|
|
|
import com.jme3.texture.Image; |
|
|
|
|
|
|
|
import com.jme3.texture.image.ColorSpace; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
|
public class AndroidImageLoader implements AssetLoader { |
|
|
|
public class AndroidImageLoader implements AssetLoader { |
|
|
@ -13,7 +14,8 @@ public class AndroidImageLoader implements AssetLoader { |
|
|
|
AndroidImageInfo imageInfo = new AndroidImageInfo(info); |
|
|
|
AndroidImageInfo imageInfo = new AndroidImageInfo(info); |
|
|
|
Bitmap bitmap = imageInfo.getBitmap(); |
|
|
|
Bitmap bitmap = imageInfo.getBitmap(); |
|
|
|
|
|
|
|
|
|
|
|
Image image = new Image(imageInfo.getFormat(), bitmap.getWidth(), bitmap.getHeight(), null); |
|
|
|
Image image = new Image(imageInfo.getFormat(), bitmap.getWidth(), bitmap.getHeight(), null, ColorSpace.sRGB); |
|
|
|
|
|
|
|
|
|
|
|
image.setEfficentData(imageInfo); |
|
|
|
image.setEfficentData(imageInfo); |
|
|
|
return image; |
|
|
|
return image; |
|
|
|
} |
|
|
|
} |
|
|
|