# SharedMemoryImage

# SharedMemoryImage

```
@RestrictTo([Scope.LIBRARY_GROUP]) class SharedMemoryImage
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                               ||
| ↳ | [android.support.wearable.watchface.SharedMemoryImage](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/SharedMemoryImage#) |

This class requires API level 27 and is only intended for use in conjunction with wear-watchface-client which also requires API level 27.

## Summary

|                                                                                                                                      Public constructors                                                                                                                                      ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [SharedMemoryImage](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/SharedMemoryImage#SharedMemoryImage())`()` This class requires API level 27 and is only intended for use in conjunction with wear-watchface-client which also requires API level 27. |

|                                                                                                                                                                                                                                                                                                                                                              Companion functions                                                                                                                                                                                                                                                                                                                                                              ||
|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html) | [ashmemReadImageBundle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/SharedMemoryImage#Companion.ashmemReadImageBundle(android.os.Bundle))`(`bundle:` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)`)` Deserializes a[Bundle](https://developer.android.com/reference/android/os/Bundle.html)containing a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)serialized by[ashmemWriteImageBundle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/SharedMemoryImage#Companion.ashmemWriteImageBundle(android.graphics.Bitmap)). |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)       | [ashmemWriteImageBundle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/SharedMemoryImage#Companion.ashmemWriteImageBundle(android.graphics.Bitmap))`(`bitmap:` `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`)` Stores a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)in shared memory and serializes it as a bundle.                                                                                                                                                                                                                                   |

## Public constructors

### SharedMemoryImage

```
SharedMemoryImage()
```

This class requires API level 27 and is only intended for use in conjunction with wear-watchface-client which also requires API level 27.

## Companion functions

### ashmemReadImageBundle

```
fun ashmemReadImageBundle(bundle: Bundle): Bitmap
```

Deserializes a[Bundle](https://developer.android.com/reference/android/os/Bundle.html)containing a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)serialized by[ashmemWriteImageBundle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/SharedMemoryImage#Companion.ashmemWriteImageBundle(android.graphics.Bitmap)).  

### ashmemWriteImageBundle

```
@RestrictTo([Scope.LIBRARY_GROUP]) fun ashmemWriteImageBundle(bitmap: Bitmap): Bundle
```

Stores a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)in shared memory and serializes it as a bundle.