🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

imageResource

Load an ImageBitmap from an image resource.

imageResource

Source set: Android
public fun ImageBitmap.Companion.imageResource(res: Resources, @DrawableRes id: Int): ImageBitmap

Load an ImageBitmap from an image resource.

This function is intended to be used for when low-level ImageBitmap-specific functionality is required. For simply displaying onscreen, the vector/bitmap-agnostic painterResource is recommended instead.

Return

Loaded image file represented as an ImageBitmap