As someone who's done a bunch of similar work, I'm afraid the short answer 
is: you can't do that.

The slightly longer answer: As your math shows, simply loading the 
WVGA-scale bitmaps blows out the 16MB limit. Now, my understanding is that a 
Galaxy S should have 24MB of heap, but still - you're pushing it. Between 
the unavoidable couple of MB that all Android apps use, whatever else your 
code needs, and (most crucially for you) a bit of room to assemble the final 
wallpaper image, you're still going well over the limit.

A few things you might try to mitigate the situation:
- Rearrange your code so that you only load one source image at a time, do 
what you need to with it, then clear it from RAM with a recycle() call. 
- Avoid the ARGB_8888 config. If you need transparency, use ARGB_4444, 
otherwise go with RGB_565. 
- As Pent suggested, downsample your images. But that essentially just 
decreases the resolution, with a corresponding increase in pixellation.

String

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