I'm amazed yout get it working 2 times. :=)

You can not load so many (3 or more) big (over 3Mpixels) in one
process. You'll run out of memory. A full size pic of 3Mpixels in
RGB_565(16bit color) is 6MBytes of memory.

You have to decode the file with the Option's 'inSampleSize' set to
something larger than 1. 1 --> decode full size; 2 --> decode quarter
size; 4 --> decode 1/16th size. E.g. when set to 2, you'll get a
1024x786 sized pic, a quarter of the original size.

You should choose a inSampleSize that will produce a bitmap that is
closest to your view's size, so that you don't waste pixels that will
never be displayed anyway and that you don't 'waste' memory.

On May 22, 7:17 am, guruk <ilovesi...@gmail.com> wrote:
> Hi,
> I was reading in some other posts that some developers have the same
> Problem, but till now, no solution.
> its about the gallery: I have a string array with photos, but when the
> gallery does show the 2nd Picture it
> crash with:
>
> -------
> D/votw    (18078):  --- DebugMark 1 ----   E/dalvikvm-heap(18078):
> 6291456-byte external allocation too large for this process.
> E/        (18078): VM won't let us allocate 6291456 bytes /skia
> --------
>
> bm= BitmapFactory.decodeFile("/sdcard/dcim/Camera/" + photoList[0]);
>
> -- It works fine 2 Times, starting with the 3rd Time it crash.
> - In other Threads they adviced to use another pic, but as you see I
> try now
>    with (photoList[0]).... so its a FIXED same Picture.
>
> So I guess I have to release somehow the Memory, but how?
>
> Thanks
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to