cropToSquareBitmap

private fun cropToSquareBitmap(image: Bitmap): Bitmap

Crops the given bitmap such that its dimensions are equal.

The dimension of the resulting bitmap follows the smaller value between the original width and height.

Return

Cropped bitmap with equal dimensions.

Parameters

image

Bitmap to be cropped to a square.