fala70 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 ?

Use a smaller image.

A 700KB JPEG is fairly massive. Bear in mind that JPEG files have to be 
decompressed when they get turned into a bitmap. Apparently the 
uncompressed form of your image exceeds a limit on how big an individual 
memory allocation can be.

Furthermore, a 700KB JPEG has *got* to have a resolution bigger than 
what the G1 can handle. If you intend to show the whole image via some 
sort of panning mechanism, consider splitting the image up into discrete 
tiles, akin to what Google Maps does.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to