So whats a good solution? Rohit
On Feb 4, 11:07 am, Romain Guy <romain...@google.com> wrote: > Scaling the image down happens at drawing time. You are just using > images that are too large to begin with. > > > > On Wed, Feb 4, 2009 at 11:05 AM, Rohit <mord...@gmail.com> wrote: > > > I noticed that the OutOfMemoryError occurs a lot when you try to load > > an image that is larger than the view. Android needs to scale the > > image down to fit the view and that is when it seems to crash out as a > > result of the OutOfMemoryError. > > > Rohit > > > On Jan 26, 3:09 pm, blindfold <seeingwithso...@gmail.com> wrote: > >> > Check first, and think a bit. > > >> I stand by what I said. > > >> Regards > > >> On Jan 25, 8:30 pm, ad <avra...@gmail.com> wrote: > > >> > Check first, and think a bit. > > >> > On Jan 25, 2:49 pm, blindfold <seeingwithso...@gmail.com> wrote: > > >> > > How can this possibly help you? You are trying to allocate 61 MB > >> > > (3200*4800*4 bytes), which lies well above the 16 MB heap limit. I > >> > > tried once to allocate, say, 12 MB at program startup to keep Android > >> > > from all the time bumping into the heap limit and possibly crashing as > >> > > a result in case its memory management is not 100% reliable, but > >> > > trying to allocate 61 MB should not offer any benefit? > > >> > > Regards > > >> > > On Jan 25, 2:23 pm, ad <avra...@gmail.com> wrote: > > >> > > > YES YES YES!!! > >> > > > I've found solution for that bug. > >> > > > It's tricky but it works. > >> > > > Place that on the begining of your code. > > >> > > > try{ > >> > > > BitmaptmpBitmap =Bitmap.createBitmap > >> > > > (3200, 4800, > >> > > > Config.ARGB_8888); > >> > > > }catch(Throwable e){ > >> > > > e.printStackTrace(); > >> > > > System.out.println("CATCHED !!!!"); > > >> > > > } > > >> > > > I was fighting with that about 4 days. > >> > > > Hope anyone is happy now, that was hell. > > >> > > > Regards, > >> > > > avram. > > -- > Romain Guy > Android framework engineer > romain...@android.com > > Note: please don't send private questions to me, as I don't have time > to provide private support. All such questions should be posted on > public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---