Android handling out of memory exception on image processing

后端 未结 2 1049
死守一世寂寞
死守一世寂寞 2020-12-07 04:23

This is the sequence part of this question: Combining 2 Images overlayed

so the problem is: if the image size is too big - it\'ll got an exception (out of memory exc

相关标签:
2条回答
  • 2020-12-07 05:00

    The only way I can think of to handle this would be to divide the images up into pieces so you don't have to keep everything in memory at once. If you don't want to keep bmp1 you can draw bmp2 directly on top of it rather then creating a new bitmap as well, though I'm not sure if this is what you're after.

    0 讨论(0)
  • 2020-12-07 05:14

    I think you have no choice, but to rescale the bitmaps in a lower size...

    0 讨论(0)
提交回复
热议问题