Hi Dianne, Thanks for your response.
I know that there is no real thing like bitmap memory. But i also know that when i open a 12MByte bitmap (3MPixel, ARGB_8888) i *always* get a OOM error. Even if i have more than 12MByte left to work with, according to the heap dump. I'm asking if there is a way to 'guesstimate' the amount available that is left for opening (creating) bitmaps. On May 13, 2:07 pm, Dianne Hackborn <[email protected]> wrote: > There is no such thing as "bitmap memory" really. Bitmap allocations are > accounted against your app's overall memory, which is limited to 16MB. > > On Wed, May 13, 2009 at 10:35 AM, Streets Of Boston <[email protected] > > > > > > > wrote: > > > Hi, > > > Part of my application allows the user to color-correct images. When i > > open an image for editing, i'd like to know what, more or less, the > > available bitmap memory is for the device that the app is running on. > > > For the G1, the limit is use is about 6MByte (about a full-size image > > that can be taken by the phone (3MPixels) with 16 bit color ==> > > 6MByte). If i try to open anything larger, i often get an out-of- > > memory exception. Limiting it to 6MByte reduces these OOM exceptions > > by a great deal. However, i can see future devices having more memory > > available because (as one of the reasons) they can take larger pics > > (e.g. 5MPixel or something). > > > Right now, my app just uses a hard-coded limit of 6*1024*1024. Is > > there a way to make this variable, to future-proof this by examing the > > device my app is running on. If so, how? > > > Thanks! > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

