# VideoFrameProcessorTestRunner.BitmapReader

# VideoFrameProcessorTestRunner.BitmapReader

Artifact:[androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/VideoFrameProcessorTestRunner.java+class:androidx.media3.test.utils.VideoFrameProcessorTestRunner.BitmapReader)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/VideoFrameProcessorTestRunner.BitmapReader "View this page in Java")

<br />

```
interface VideoFrameProcessorTestRunner.BitmapReader
```

<br />

Known direct subclasses  
[TextureBitmapReader](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/TextureBitmapReader),[VideoFrameProcessorTestRunner.SurfaceBitmapReader](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.SurfaceBitmapReader)  

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| [TextureBitmapReader](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/TextureBitmapReader)                                                             | Reads from an OpenGL texture.                                                             |
| [VideoFrameProcessorTestRunner.SurfaceBitmapReader](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.SurfaceBitmapReader) | Reads from a[Surface](https://developer.android.com/reference/android/view/Surface.html). |

*** ** * ** ***

Reads a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)from[VideoFrameProcessor](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor)output.

## Summary

|                               ### Public functions                                |
|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`!` | [getBitmap](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.BitmapReader#getBitmap())`()` Returns the output[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html).                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [Surface](https://developer.android.com/reference/android/view/Surface.html)`?`   | [getSurface](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/VideoFrameProcessorTestRunner.BitmapReader#getSurface(int,int,boolean))`(` ` width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`,` ` useHighPrecisionColorComponents: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) `)` Returns the[VideoFrameProcessor](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor)output[Surface](https://developer.android.com/reference/android/view/Surface.html), if one is needed. |

## Public functions

### getBitmap

```
fun getBitmap(): Bitmap!
```

Returns the output[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html).  

### getSurface

```
fun getSurface(
    width: Int,
    height: Int,
    useHighPrecisionColorComponents: Boolean
): Surface?
```

Returns the[VideoFrameProcessor](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessor)output[Surface](https://developer.android.com/reference/android/view/Surface.html), if one is needed.