1

I am trying to have a workaround with Google's Camera API - CameraX, because older devices do not support multiple use cases (ImageCapture and VideoCapture).

So i want to take a picture capturing the preview frame and convert it to bitmap without using use cases ImageCapture or ImageAnalysis.

areyouSEARious
  • 117
  • 1
  • 13
  • 2
    If you are using `PreviewView`, there is [PreviewView.getBitmap][1]. Otherwise you can take a look at the [source code of PreviewView][2] and do something similar. [1]: https://developer.android.com/reference/androidx/camera/view/PreviewView#getBitmap() [2]: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/androidx-master-dev/camera/camera-view/src/main/java/androidx/camera/view/PreviewView.java – Xi 张熹 Jul 16 '20 at 16:20
  • I managed to solve this issue. You can see here in my other question i posted the solution. https://stackoverflow.com/questions/61719500/camerax-previewview-screenshot Thank you. – areyouSEARious Jul 16 '20 at 17:34
  • That works, but it's more of a workaround for a missing feature. Now the feature is officially supported by CameraX and you don't have to set it to TextureView. – Xi 张熹 Jul 17 '20 at 18:27

0 Answers0