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

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOS
- Cmn

  ```
  fun interface OnDecodeTexturePngBytes
  ```

*** ** * ** ***

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

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/ink/storage/OnDecodeTexturePngBytes#onDecodeTexture(kotlin.String,kotlin.ByteArray)(clientTextureId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, pngBytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html?)` Low-level callback for recording serialized textures when a `https://developer.android.com/reference/kotlin/androidx/ink/brush/BrushFamily` is decoded. | Cmn |

## Public functions

### onDecodeTexture

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

```
fun onDecodeTexture(clientTextureId: String, pngBytes: ByteArray?): String
```

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

| Parameters |
|---|---|
| `clientTextureId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The client-provided texture ID. |
| `pngBytes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html?` | The PNG bytes of the texture bitmap, or null if none was encoded. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | The texture ID to use in the decoded BrushFamily. |