load

actual suspend fun load(url: BasicUrl): ImageBitmap?

Loads an image from the given url and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the network request off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Example:

val url = BasicUrl("https://picsum.photos/200")
val bitmap = ImageLoader.load(url)

Parameters

url

The BasicUrl of the image to load.


actual suspend fun load(path: BasicPath): ImageBitmap?

Loads an image from the given local file path and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the file reading off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Example:

val path = BasicPath("appLocalDirectory/cacheDirectory/images/exampleImage.jpeg")
val bitmap = ImageLoader.load(path)

Parameters

path

The BasicPath of the image to load.

expect suspend fun load(url: BasicUrl): ImageBitmap?

Asynchronously loads an image from a BasicUrl.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

url

The BasicUrl of the image to load.


expect suspend fun load(path: BasicPath): ImageBitmap?

Asynchronously loads an image from a local BasicPath.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

path

The BasicPath of the image to load.

actual suspend fun load(url: BasicUrl): ImageBitmap?

Loads an image from the given url and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the network request off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

url

The BasicUrl of the image to load.


actual suspend fun load(path: BasicPath): ImageBitmap?

Loads an image from the given local file path and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the file reading off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

path

The BasicPath of the image to load.

actual suspend fun load(url: BasicUrl): ImageBitmap?

Asynchronously loads an image from the given url and converts it to an ImageBitmap.

Return

The loaded ImageBitmap, or null if the image could not be loaded or decoded.

Parameters

url

The BasicUrl of the image to load.


actual suspend fun load(path: BasicPath): ImageBitmap?
actual suspend fun load(url: BasicUrl): ImageBitmap?

Loads an image from the given url and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the network request off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

url

The BasicUrl of the image to load.


actual suspend fun load(path: BasicPath): ImageBitmap?

Loads an image from the given local file path and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the file reading off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

path

The BasicPath of the image to load.

actual suspend fun load(url: BasicUrl): ImageBitmap?

Loads an image from the given url and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the network request off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

url

The BasicUrl of the image to load.


actual suspend fun load(path: BasicPath): ImageBitmap?

Loads an image from the given local file path and converts it to an ImageBitmap.

This function is asynchronous and should be called from a coroutine. It uses Dispatchers.IO to perform the file reading off the main thread.

Return

The loaded ImageBitmap, or null if the image could not be loaded.

Parameters

path

The BasicPath of the image to load.

actual suspend fun load(url: BasicUrl): ImageBitmap?

Asynchronously loads an image from the given url and converts it to an ImageBitmap.

Return

The loaded ImageBitmap, or null if the image could not be loaded or decoded.

Parameters

url

The BasicUrl of the image to load.


actual suspend fun load(path: BasicPath): ImageBitmap?