I'm not sure about the exact point of failure, which - indeed - seems very precisely cut against the memory needed to load exactly one camera pic.
However, you can avoid this. Don't load the full size pic. Load the bitmap using the BitmapFactory and set the Config's inSampleSize attribute to a value larger than 1 (2, 4, 8, 16) that would fit the pixel-size of your PictureView. E.g. use 4 to get a 512 x 384 bitmap that can snuggly fit (without being up-scaled) into a 480x320 size PictureView. If your PictureView is smaller, set the 'inSampleSize' to a larger value. On May 27, 2:30 pm, Max Salley <[email protected]> wrote: > I have an app that displays a camera picture as part of it, but if the > picture is in memory I get an out of memory exception when an > allocation of any size happens no matter what. If the app uses a > seekbar in addition to my PictureView the ~900 bytes it allocates are > too much. I even tried to load a 16x16 monochrome image on top of the > camera pic, but the 256 bytes were too much. I find it extremely > unlikely that the object containing the image is precisely the size so > that using it alone never causes a crash, but allocating even 256 more > bytes exceeds the memory budget. Does anybody know what the problem > is? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

