takePicture

suspend fun takePicture(): ByteArray

Takes a picture and returns its JPEG bytes.

Return

The captured image encoded as JPEG.

Throws

If the state is not attached to a screen, the camera is not ready, or another capture is already in progress.