downscale

fun downscale(bitmap: Bitmap, maxWidth: Int = 1080): Bitmap

Downscales a bitmap if its width exceeds the maximum width. Maintains aspect ratio.