BasicImage

fun BasicImage(path: BasicPath, contentDescription: String? = null, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DefaultFilterQuality, placeholderEnabled: Boolean = true)

A composable that lays out and asynchronously draws a ImageBitmap from a given BasicPath using a LaunchedEffect.

Example:

@Composable
fun Test() {
// Loads an image via URL location
BasicImage(path = BasicPath("/images/exampleImage.jpeg"))
}

Parameters

path

The BasicPath to obtain the PNG, JPEG, or WEBP file

contentDescription

text used by accessibility services to describe what this image represents.

modifier

Modifier used to adjust the layout algorithm or draw decoration content (ex. background)

alignment

Optional alignment parameter used to place the ImageBitmap in the given bounds defined by the width and height

contentScale

Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the ImageBitmap

alpha

Optional opacity to be applied to the ImageBitmap when it is rendered onscreen

colorFilter

Optional ColorFilter to apply for the ImageBitmap when it is rendered onscreen

filterQuality

Sampling algorithm applied to the ImageBitmap when it is scaled and drawn into the destination. The default is FilterQuality.Low which scales using a bilinear sampling algorithm

placeholderEnabled

Boolean value to determine if the image should be preceded by a circular progress indicator while loading.


fun BasicImage(url: BasicUrl, contentDescription: String? = null, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, filterQuality: FilterQuality = DefaultFilterQuality, placeholderEnabled: Boolean = true)

A composable that lays out and asynchronously draws a ImageBitmap from a given BasicUrl using a LaunchedEffect.

Example:

@Composable
fun Test() {
// Loads an image via URL location
BasicImage(url = BasicUrl("https://picsum.photos/200"))
}

Parameters

url

The BasicUrl to obtain the PNG, JPEG, or WEBP file

contentDescription

text used by accessibility services to describe what this image represents.

modifier

Modifier used to adjust the layout algorithm or draw decoration content (ex. background)

alignment

Optional alignment parameter used to place the ImageBitmap in the given bounds defined by the width and height

contentScale

Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the ImageBitmap

alpha

Optional opacity to be applied to the ImageBitmap when it is rendered onscreen

colorFilter

Optional ColorFilter to apply for the ImageBitmap when it is rendered onscreen

filterQuality

Sampling algorithm applied to the ImageBitmap when it is scaled and drawn into the destination. The default is FilterQuality.Low which scales using a bilinear sampling algorithm

placeholderEnabled

Boolean value to determine if the image should be preceded by a circular progress indicator while loading.