Rather than writing all your own image resizing code, Android has a set of APIs which can do all this work for you. But the trick is, knowing which one to use?
For example, inSampleSize is the fastest way to down-scale your image; But you can only make it smaller by some factor of your image. createScaledBitmap is a great API, but requires an extra memory allocation to get it done.
Thankfully, Colt McAnlis covers all these topics (and more) in this video, helping you reduce your memory footprint, and get some smaller images.
No comments:
Post a Comment