android - Out of memory error in creating bitmap -
this question has answer here:
i getting out of memory errors in android project , points statement:
bitmap = bitmap.createbitmap(width, height, bitmap.config.argb_8888);
is there alternate way create argb_8888
bitmap save me out of memory errors?
suggestions appreciated. in advance :)
there many problems memory exceptions bitmaps on android, many of discussed on stackoverflow. best if went through existing questions see if yours matches 1 of existing ones, if not, write makes situation different.
different bitmap configurations have different memory footprints. rgb_565 16 bit colour format. argb_8888 32 bit format.
regardless of getholder().setformat(); configuration you've chosen, or how it's being drawn, argb_8888 bitmap going larger (in memory) bitmap in rgb_565 format. better use rgb_565 format instead of argb_8888.
some examples:
out of memory exception due large bitmap size
android: out of memory exception in gallery
android handling out of memory exception on image processing
etc : https://stackoverflow.com/search?q=android+out+of+memory+exception+bitmap
for more detail visit here. android - out of memory exception when creating bitmap
Comments
Post a Comment