Mike, can you explain me how did you use BitmapFactory.Options params
to  resize the image ?

Stefano

On 12 Dic, 00:03, EboMike <ebom...@gmail.com> wrote:
> I tried using BitmapFactory.Options when calling
> BitmapFactory.decodePath() on Romain's recommendation to resize the
> 1024x768 JPG files down to 480x320 before displaying them in a
> Gallery, but that didn't help at all - if anything, it made things
> worse. The app still runs out after viewing just a few images.
>
> -Mike
>
> On Dec 11, 10:38 am, "Justin (Google Employee)" <j...@google.com>
> wrote:
>
>
>
>
>
> > Are you scaling the image down when you display it? Look at the longer
> > form of BitmapFactory.decodeByteArray. The BitmapFactory.Options
> > argument has parameters for down sampling the image on load.
>
> > Cheers,
> > Justin
> > Android Team @ Google
>
> > On Dec 11, 10:10 am, fala70 <fal...@gmail.com> wrote:
>
> > > my application open in sequence 3 activities, on last I've this
> > > situation heap:
> > > ID     Heap Size Allocated   Free         Used         Objs.
> > > 1       2,945 MB        1,936 MB        1,009 MB        65,75%  38.365
>
> > > at any case I've a problem that I can't solve againg after much time
> > > that I am on. I need to show a list, grid or gallery of a few photo
> > > selected from user from internal or external memory. For that I used:
>
> > >             Uri target = Media.INTERNAL_CONTENT_URI;
> > >             Intent intent = new Intent(Intent.ACTION_PICK, target);
> > >             startActivityForResult(intent, GET_IMAGE_FROM_FOLDER);
>
> > > and that work good. Then I know the picture id and if it is in
> > > internal or external media.. Now I need to show the thumbnail of these
> > > picture selected but that is impossible I can't do it for too much
> > > memory request. All picture are taked from camera.
>
> > > is there a solution for resize the images without goi out of memory ?
>
> > > On 11 Dic, 13:51, Romain Guy <romain...@google.com> wrote:
>
> > > > It works when you load a smaller file because you simply have very
> > > > little amount of memory left. Your application is using too much
> > > > memory, you need to trim it down.
>
> > > > On Thu, Dec 11, 2008 at 1:00 AM,fala70<fal...@gmail.com> wrote:
>
> > > > > I 've a similar problem. I am going crazy from several days.... Is
> > > > > impossible to show images from internal or external memory captured
> > > > > from camera. Also I tried to read a file jpg of 700KB and use
> > > > > BitmapFactory.decodeByteArray to get the bitmap, but I receive that
> > > > > exeption:
>
> > > > > 12-11 00:50:27.819: ERROR/dalvikvm-heap(3547): 6291456-byte external
> > > > > allocation too large for this process.
>
> > > > > if I try to load an image smaller (around 4K)
> > > > > BitmapFactory.decodeByteArray work good.
>
> > > > > somebody has a solution ?
>
> > > > --
> > > > Romain Guywww.curious-creature.org
>
>
--~--~---------~--~----~------------~-------~--~----~
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