ResourceLoader

data object ResourceLoader : ImageBitmapLoader<Resource>

A ImageBitmapLoader that loads ImageBitmaps from Resources.

Warning: Only supports non vector images, like PNGs and JPEGs.

Usage:

import org.jetbrains.compose.resources.resource

val resImage = resource("my_image.png")
val imageBitmap = ResourceLoader.load(resImage)

Functions

Link copied to clipboard
open suspend override fun load(input: Resource): ImageBitmap

Load the Resource than convert it to a ImageBitmap.