I am trying to load a spritesheet image as bitmap, the image resolution is 3598 x 3598 and its size is 1.21MB. But when I try to load it from following code
AssetManager assets = this.getAssets();
try {
InputStream inputStream = assets.open("spritesheet.png");
BufferedInputStream bufferedStream = new BufferedInputStream(inputStream);
Bitmap bitMap = BitmapFactory.decodeStream(bufferedStream);
} catch (Exception e) {}
I am getting OOM (Out of Memory) exception :'(, Please guide what can I do??