---
title: "ImageShader"
description: "Creates a Shader using the given [ImageBitmap] as an input texture. If the shader is to be drawn
in an area larger than the size of the [ImageBitmap], the region is filled in the horizontal and
vertical directions based on the [tileModeX] and [tileModeY] parameters."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun ImageShader(
    image: ImageBitmap,
    tileModeX: TileMode = TileMode.Clamp,
    tileModeY: TileMode = TileMode.Clamp,
): Shader
```


Creates a Shader using the given `ImageBitmap` as an input texture. If the shader is to be drawn
in an area larger than the size of the `ImageBitmap`, the region is filled in the horizontal and
vertical directions based on the `tileModeX` and `tileModeY` parameters.



