# OnDecodeTexturePngBytes

Artifact: [androidx.ink:ink-storage](https://developer.android.com/jetpack/androidx/releases/ink) [View Source](https://cs.android.com/search?q=file:androidx/ink/storage/BrushFamilyExtensions.kt+class:androidx.ink.storage.OnDecodeTexturePngBytes) Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

*** ** * ** ***


```
public fun interface OnDecodeTexturePngBytes
```

<br />

*** ** * ** ***

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/ink/storage/OnDecodeTexturePngBytes#onDecodeTexture(kotlin.String,kotlin.ByteArray)` |   |

## Summary

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/ink/storage/OnDecodeTexturePngBytes#onDecodeTexture(kotlin.String,kotlin.ByteArray)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId, byte[] pngBytes)` Low-level callback for recording serialized textures when a `https://developer.android.com/reference/androidx/ink/brush/BrushFamily` is decoded. |

## Public methods

### onDecodeTexture

Added in [1.1.0-alpha11](https://developer.android.com/jetpack/androidx/releases/ink#1.1.0-alpha11)

```
abstract @NonNull String onDecodeTexture(@NonNull String clientTextureId, byte[] pngBytes)
```

Low-level callback for recording serialized textures when a `https://developer.android.com/reference/androidx/ink/brush/BrushFamily` is decoded.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html clientTextureId` | The client-provided texture ID. |
| `byte[] pngBytes` | The PNG bytes of the texture bitmap, or null if none was encoded. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | The texture ID to use in the decoded BrushFamily. |