Companion

object Companion

Functions

Link copied to clipboard
fun fromAsset(name: String): Image

Create an image object from a file path, relative to the assets directory. Throws an exception if the file cannot be found.

Link copied to clipboard
fun fromFile(file: File): Image

Create an image object from a java.io.File object. Throws an exception if the file cannot be found.

fun fromFile(file: String): Image

Create an image object from a file path. Throws an exception if the file cannot be found.

Link copied to clipboard
fun fromUrl(url: String, cachedImageName: String? = null): Image

Creates an image object from a URL. Throws an exception if an image cannot be created from the URL. Will cache the image in the assets

Sources

Link copied to clipboard