---
title: "RemoteImageBitmap"
description: "Abstract base class for all remote bitmap representations in Compose Remote, this class extends RemoteState<ImageBitmap>."
type: "class"
lastmod: "2026-06-18T10:32:53.181552Z"
---
## API Reference

> Source set: Android

```kotlin
public abstract class RemoteImageBitmap
internal constructor(
    public override val constantValueOrNull: ImageBitmap?,
    cacheKey: RemoteStateCacheKey,
) : BaseRemoteState<ImageBitmap>(cacheKey)
```

Abstract base class for all remote bitmap representations in Compose Remote, this class extends
[RemoteState<ImageBitmap>].

`RemoteImageBitmap` represents an image value that can be a constant, a named variable, or an
offscreen buffer.

## Properties

### width

> Source set: Android

```kotlin
public val width: RemoteFloat
```

The width of the bitmap as represented in the remote document.

### height

> Source set: Android

```kotlin
public val height: RemoteFloat
```

The height of the bitmap as represented in the remote document.

## Companion Object

#### Methods

> Source set: Android

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public operator fun invoke(value: ImageBitmap): MutableRemoteImageBitmap
```

Creates a [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) instance from a [ImageBitmap](/jetpack-compose/androidx.compose.ui/ui-graphics/interfaces/ImageBitmap) value. This factory method
can be used with or without an explicit `RemoteComposeCreationState`.

#### Parameters

| | |
| --- | --- |
| value | The [ImageBitmap](/jetpack-compose/androidx.compose.ui/ui-graphics/interfaces/ImageBitmap) value. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) representing the provided bitmap. |

> Source set: Android

```kotlin
@JvmStatic
public fun createNamedRemoteImageBitmap(
    name: String,
    defaultValue: ImageBitmap,
    domain: RemoteState.Domain = RemoteState.Domain.User,
): RemoteImageBitmap
```

Creates a named [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) with an initial value.

Named remote bitmaps can be set via AndroidRemoteContext.setNamedBitmap.

#### Parameters

| | |
| --- | --- |
| name | A unique name to identify this state within its `domain`. |
| defaultValue | The initial [ImageBitmap](/jetpack-compose/androidx.compose.ui/ui-graphics/interfaces/ImageBitmap) value for the named remote bitmap. |
| domain | The domain for the named state. Defaults to [RemoteState.Domain.User](/jetpack-compose/androidx.compose.remote/remote-creation-compose/objects/RemoteState.Domain.User). |

#### Returns

| | |
| --- | --- |
|  | A [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) representing the named bitmap. |

> Source set: Android

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public fun createOffscreenRemoteBitmap(width: Int, height: Int): RemoteImageBitmap
```

Creates a [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) with the specified [width](/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/width) and [height](/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/height).

#### Parameters

| | |
| --- | --- |
| width | The width of the [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) to create |
| height | The height of the [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) to create |

#### Returns

| | |
| --- | --- |
|  | A [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) with the specified [width](/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/width) and [height](/jetpack-compose/androidx.compose.remote/remote-creation-compose/functions/height). |
