# 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)

*** ** * ** ***


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

<br />

*** ** * ** ***

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

## Summary

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

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html obj)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html byte[]` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getData()()` Gets the byte array representing the image. |
| `int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getFormat()()` Gets the format of the byte array data representing the image. |
| `@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 1) int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getHeightPx()()` Gets the native height of the image, in pixels. |
| `@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 1) int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#getWidthPx()()` Gets the native width of the image, in pixels. |
| `int` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/wear/protolayout/ResourceBuilders.InlineImageResource#toString()()` |

## Public methods

### equals

```
public boolean equals(@Nullable Object obj)
```

### getData

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

```
public @NonNull byte[] getData()
```

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)

```
public int getFormat()
```

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)

```
public @Dimension(unit = 1) int getHeightPx()
```

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)

```
public @Dimension(unit = 1) int getWidthPx()
```

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

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```