zoom

fun Bitmap.zoom(originalRegion: Rect, newRegion: Rect, newImageSize: Size): Bitmap

Selects a region from the source Bitmap, resizing that to a new region, and transforms the remainder of the Bitmap into a border. See resizeRegion and rearrangeBySegments.