# androidx.test.core.graphics

*** ** * ** ***

## Extension functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/graphics/Bitmap.html.https://developer.android.com/reference/kotlin/androidx/test/core/graphics/package-summary#(android.graphics.Bitmap).writeToTestStorage(kotlin.String)(name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Writes the contents of the `https://developer.android.com/reference/android/graphics/Bitmap.html` to a compressed png file on `https://developer.android.com/reference/kotlin/androidx/test/platform/io/PlatformTestStorage` |

## Extension functions

### Bitmap.writeToTestStorage

Artifact: [androidx.test:core](https://developer.android.com/jetpack/androidx/releases/test) [View Source](https://cs.android.com/search?q=file:androidx/test/core/graphics/BitmapStorageExt.kt+function:writeToTestStorage)

```
fun Bitmap.writeToTestStorage(name: String): Unit
```

Writes the contents of the `https://developer.android.com/reference/android/graphics/Bitmap.html` to a compressed png file on `https://developer.android.com/reference/kotlin/androidx/test/platform/io/PlatformTestStorage`

| Parameters |
|---|---|
| `name: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | a descriptive base name for the resulting file. '.png' will be appended to this name. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` | if bitmap could not be compressed or written to ds |