# ResourceBuilders.InlineImageResource

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

*** ** * ** ***


```
public final class ResourceBuilders.InlineImageResource
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Deprecated in Java

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/tiles/ResourceBuilders.InlineImageResource.Builder` **This class is deprecated.** Deprecated in Java |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html byte[]` | `[getData](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getData())()` **This method is deprecated.** Deprecated in Java |
| `int` | `[getFormat](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getFormat())()` **This method is deprecated.** Deprecated in Java |
| `@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 1) int` | `[getHeightPx](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getHeightPx())()` **This method is deprecated.** Deprecated in Java |
| `@https://developer.android.com/reference/androidx/annotation/Dimension(unit = 1) int` | `[getWidthPx](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getWidthPx())()` **This method is deprecated.** Deprecated in Java |

## Public methods

### getData

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

```
public @NonNull byte[] [getData](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getData())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

Gets the byte array representing the image. Intended for testing purposes only.

### getFormat

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

```
public int [getFormat](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getFormat())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

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. Intended for testing purposes only.

### getHeightPx

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

```
public @Dimension(unit = 1) int [getHeightPx](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getHeightPx())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

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. Intended for testing purposes only.

### getWidthPx

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

```
public @Dimension(unit = 1) int [getWidthPx](https://developer.android.com/reference/androidx/wear/tiles/ResourceBuilders.InlineImageResource#getWidthPx())()
```

> [!CAUTION]
> **This method is deprecated.**   
> Deprecated in Java

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. Intended for testing purposes only.