In XML based image, we can have matrix scale type as per https://medium.com/mobile-app-development-publication/android-matrix-scaletype-explained-4501f0796be8, which is a very powerful custom scale type one can perform on an Image.
However, in JetpackCompose image, we no longer have Matix Scale. Instead the contentScale
Image(imagePicture,
contentDescription = null,
modifier = Modifier.fillMaxSize(),
alignment = alignment.alignment,
contentScale = scale.scaleType // the scale here
)
Only have those as listed here https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ContentScale, i.e. Crop, Fit, FillWidth, FillHeight, FillBounds, Fit, Inside, and None.
How can I achieve Matrix Scale in JetpackCompose?