java - Super big size sprite sheet to load in android - outofmemoryerror -


my question best possible solution or work around problem?

this problem. doing 2d android game flash game. have png image dimension 8000 x 4800. sprite sheet 10 columns , 10 rows, each frame has 800 x 480 dimension. know super big size sprite sheet because flash game super animated , has graphics, exported each action/scene png sequence retain animation , quality of graphics , avoid calculation of animation.

if load picture in android, got outofmemoryerror. think because of image size. got 4 more image same dimension load on same screen. please me. best possible solution or work around this.

you need sale down image before display same.

http://developer.android.com/training/displaying-bitmaps/load-bitmap.html.

check topic under loading scaled down version in memory.

also should recycle bitmaps when not in use. load bitmaps in onresume() , in onpause() recycle bitmaps.

   bitmap.recycle() 

http://www.youtube.com/watch?v=_cruqy55hok

the talk in video memory management.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -