# Image

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/Image.composable#Image(androidx.glance.ImageProvider,kotlin.String,androidx.glance.GlanceModifier,androidx.glance.layout.ContentScale,androidx.glance.ColorFilter)( provider: https://developer.android.com/reference/kotlin/androidx/glance/ImageProvider, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, modifier: https://developer.android.com/reference/kotlin/androidx/glance/GlanceModifier, contentScale: https://developer.android.com/reference/kotlin/androidx/glance/layout/ContentScale, colorFilter: https://developer.android.com/reference/kotlin/androidx/glance/ColorFilter? )` A composable which lays out and draws the image specified in `https://developer.android.com/reference/kotlin/androidx/glance/package-summary#Image(androidx.glance.ImageProvider,kotlin.String,androidx.glance.GlanceModifier,androidx.glance.layout.ContentScale,androidx.glance.ColorFilter)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/glance/Image.composable#Image(androidx.glance.ImageProvider,kotlin.String,kotlin.Float,androidx.glance.GlanceModifier,androidx.glance.layout.ContentScale,androidx.glance.ColorFilter)( provider: https://developer.android.com/reference/kotlin/androidx/glance/ImageProvider, contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/glance/GlanceModifier, contentScale: https://developer.android.com/reference/kotlin/androidx/glance/layout/ContentScale, colorFilter: https://developer.android.com/reference/kotlin/androidx/glance/ColorFilter? )` A composable which lays out and draws the image specified in `https://developer.android.com/reference/kotlin/androidx/glance/package-summary#Image(androidx.glance.ImageProvider,kotlin.String,kotlin.Float,androidx.glance.GlanceModifier,androidx.glance.layout.ContentScale,androidx.glance.ColorFilter)`. |

## Functions

### Image

Artifact: [androidx.glance:glance](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/Image.kt+function:Image) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/glance#1.2.0)

```
@Composable
fun Image(
    provider: ImageProvider,
    contentDescription: String?,
    modifier: GlanceModifier = GlanceModifier,
    contentScale: ContentScale = ContentScale.Fit,
    colorFilter: ColorFilter? = null
): Unit
```

A composable which lays out and draws the image specified in `https://developer.android.com/reference/kotlin/androidx/glance/package-summary#Image(androidx.glance.ImageProvider,kotlin.String,androidx.glance.GlanceModifier,androidx.glance.layout.ContentScale,androidx.glance.ColorFilter)`. This will attempt to lay out the image using the intrinsic width and height of the provided image, but this can be overridden by using a modifier to set the width or height of this element.

| Parameters |
|---|---|
| `provider: https://developer.android.com/reference/kotlin/androidx/glance/ImageProvider` | The image provider to use to draw the image |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/glance/GlanceModifier = GlanceModifier` | Modifier used to adjust the layout algorithm or draw decoration content. |
| `contentScale: https://developer.android.com/reference/kotlin/androidx/glance/layout/ContentScale = ContentScale.Fit` | How to lay the image out with respect to its bounds, if the bounds are smaller than the image. |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/glance/ColorFilter? = null` | The effects to use to modify the color of an image. |

### Image

Artifact: [androidx.glance:glance](https://developer.android.com/jetpack/androidx/releases/glance) [View Source](https://cs.android.com/search?q=file:androidx/glance/Image.kt+function:Image) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/glance#1.2.0)

```
@Composable
fun Image(
    provider: ImageProvider,
    contentDescription: String?,
    alpha: @FloatRange(from = 0.0, to = 1.0) Float,
    modifier: GlanceModifier = GlanceModifier,
    contentScale: ContentScale = ContentScale.Fit,
    colorFilter: ColorFilter? = null
): Unit
```

A composable which lays out and draws the image specified in `https://developer.android.com/reference/kotlin/androidx/glance/package-summary#Image(androidx.glance.ImageProvider,kotlin.String,kotlin.Float,androidx.glance.GlanceModifier,androidx.glance.layout.ContentScale,androidx.glance.ColorFilter)`. This will attempt to lay out the image using the intrinsic width and height of the provided image, but this can be overridden by using a modifier to set the width or height of this element.

| Parameters |
|---|---|
| `provider: https://developer.android.com/reference/kotlin/androidx/glance/ImageProvider` | The image provider to use to draw the image |
| `contentDescription: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | text used by accessibility services to describe what this image represents. This should always be provided unless this image is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized. |
| `alpha: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Opacity (0f to 1f) to apply to the image. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/glance/GlanceModifier = GlanceModifier` | Modifier used to adjust the layout algorithm or draw decoration content. |
| `contentScale: https://developer.android.com/reference/kotlin/androidx/glance/layout/ContentScale = ContentScale.Fit` | How to lay the image out with respect to its bounds, if the bounds are smaller than the image. |
| `colorFilter: https://developer.android.com/reference/kotlin/androidx/glance/ColorFilter? = null` | The effects to use to modify the color of an image. |