load
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
The BasicUrl of the image to load.
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
The BasicPath of the image to load.
Asynchronously loads an image from a BasicUrl.
Return
The loaded ImageBitmap, or null
if the image could not be loaded.
Parameters
The BasicUrl of the image to load.
Asynchronously loads an image from a local BasicPath.
Return
The loaded ImageBitmap, or null
if the image could not be loaded.
Parameters
The BasicPath of the image to load.
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
The BasicUrl of the image to load.
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
The BasicPath of the image to load.
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
The BasicUrl of the image to load.
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
The BasicUrl of the image to load.
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
The BasicPath of the image to load.
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
The BasicUrl of the image to load.
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
The BasicPath of the image to load.
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
The BasicUrl of the image to load.