Pre-scaling Bitmaps

For media wealthy functions, BITMAPS are in every single place. However these high-resolution photographs may cause a horde of efficiency issues if the dimensions of the picture in reminiscence is bigger than the dimensions you’re displaying it on display screen. As such one of the vital necessary issues you are able to do to alleviate reminiscence strain in your app, is resizing your bitmaps.

Slightly than writing all your individual picture resizing code, Android has a set of APIs which may do all this give you the results you want. However the trick is, figuring out which one to make use of?

For instance, inSampleSize is the quickest solution to down-scale your picture; However you’ll be able to solely make it smaller by some issue of your picture. createScaledBitmap is a superb API, however requires an additional reminiscence allocation to get it carried out.

Fortunately, Colt McAnlis covers all these subjects (and extra) on this video, serving to you cut back your reminiscence footprint, and get some smaller photographs.


Android Coding

jQuery(document).ready(function($) { $.post('https://opensourceprojects.org/wp-admin/admin-ajax.php', {action: 'wpt_view_count', id: '380'}); });

Leave A Reply

Your email address will not be published.