Possible Duplicate:
How to resize a BitMap in android?
Can anyone show me how to scale a Bitmap
object in Android
. I want to change the height and width of the bitmap object to fit an ImageView
.
Kind Regards
Possible Duplicate:
How to resize a BitMap in android?
Can anyone show me how to scale a Bitmap
object in Android
. I want to change the height and width of the bitmap object to fit an ImageView
.
Kind Regards
Here is how you can scale your bitmap to required size:
Bitmap bitmap = Bitmap.createScaledBitmap(realBitmap,imageWidth, imageHeight, true);
Here you can give imageWidth and imageHeight according to your need. "realBitmap" is the real bitmap you have and "bitmap" is the Bitmap returned after scaling.