# ResourceBuilders.InlineImageResource

Artifact: [androidx.wear.protolayout:protolayout](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/ResourceBuilders.java+class:androidx.wear.protolayout.ResourceBuilders.InlineImageResource) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

<br />

```
@RequiresSchemaVersion(major = 1, minor = 0)
class ResourceBuilders.InlineImageResource
```

<br />

*** ** * ** ***

An image resource whose data is fully inlined, with no dependency on a system or app resource.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource.Builder` Builder for `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte/index.html>` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getData()()` Gets the byte array representing the image. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getFormat()()` Gets the format of the byte array data representing the image. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getHeightPx()()` Gets the native height of the image, in pixels. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/Dimension(unit = 1) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getWidthPx()()` Gets the native width of the image, in pixels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#toString()()` |

## Public functions

### equals

```
fun equals(obj: Any?): Boolean
```

### getData

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun getData(): Array<Byte>
```

Gets the byte array representing the image.

### getFormat

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun getFormat(): Int
```

Gets the format of the byte array data representing the image. May be left unspecified or set to IMAGE_FORMAT_UNDEFINED in which case the platform will attempt to extract this from the raw image data. If the platform does not support the format, the image will not be decoded or displayed.

### getHeightPx

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun getHeightPx(): @Dimension(unit = 1) Int
```

Gets the native height of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

### getWidthPx

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

```
fun getWidthPx(): @Dimension(unit = 1) Int
```

Gets the native width of the image, in pixels. Only required for formats (e.g. IMAGE_FORMAT_RGB_565) where the image data does not include size.

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String
```