-
Notifications
You must be signed in to change notification settings - Fork 21
BitmapScale
Alexander Zhirkevich edited this page Oct 5, 2022
·
3 revisions
Way of resizing image to the appropriate size.
fun interface BitmapScale {
fun scale(drawable: Drawable, width : Int, height : Int) : Bitmap
}
fun scale(drawable: Drawable, width : Int, height : Int) : Bitmap
Create Bitmap
from Drawable
with desired width
and height
in a specific way.
Implementation | Description |
---|---|
BitmapScale.FitXY |
Simple resize. Image aspect ration can be broken |
BitmapScale.CenterCrop |
Crop given image and cut necessary bitmap from center. Image's aspect ratio will be kept |