Quantcast
Channel: Jontas » Java
Viewing all articles
Browse latest Browse all 10

Android resize a bitmap

$
0
0

Here is a snippet to scale down a bitmap – the original bitmap still needs to fit on memory though

InputStream bitmap = mContext.getAssets().open("image.file");
Bitmap scaledBitmap= Bitmap.createScaledBitmap(BitmapFactory.decodeStream(bitmap), 120, 120, false);
bitmap.

Viewing all articles
Browse latest Browse all 10

Trending Articles