Try:
Bitmap yourBitmap;
Bitmap resized = Bitmap.createScaledBitmap(yourBitmap, newWidth, newHeight, true);
or:
resized = Bitmap.createScaledBitmap(yourBitmap,(int)(yourBitmap.getWidth()*0.8), (int)(yourBitmap.getHeight()*0.8), true);
More Related Contents:
- How to convert a Drawable to a Bitmap?
- java.lang.OutOfMemoryError: bitmap size exceeds VM budget – Android
- How to use JNI bitmap operations for helping to avoid OOM when using large images? [closed]
- Resize a large bitmap file to scaled output file on Android
- How to solve java.lang.OutOfMemoryError trouble in Android
- Masking(crop) image in frame
- Android Crop Center of Bitmap
- Use Picasso to get a callback with a Bitmap
- Getting Bitmap from vector drawable
- How to save a bitmap on internal storage
- Decrease image size without losing its quality in android
- Comparing Bitmap images in Android
- OutofMemoryError: bitmap size exceeds VM budget (Android)
- Generate bitmap from HTML in Android
- Creating an empty bitmap and drawing though canvas in Android
- Android saving Bitmap to SD card
- MediaMetadataRetriever.getFrameAtTime() returns only first frame
- Captured Photo orientation is changing in android
- VideoView getDrawingCache is returning black
- Rotating a bitmap using JNI & NDK
- Bitmap too large to be uploaded into a texture
- Immutable bitmap crash error
- Convert String text to Bitmap
- How do I scale a streaming bitmap in-place without reading the whole image first?
- Android how to save a bitmap – buggy code
- Sharing Bitmap via Android Intent
- Why would I ever NOT use BitmapFactory’s inPurgeable option?
- How to resize a bitmap eficiently and with out losing quality in android
- How to attach image from drawable to gmail?
- view.getDrawingCache() is deprecated in Android API 28