Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CameraX PreviewView Screenshot

I want to convert CameraX preview to bitmap from previewView. Something similar to textureView.bitmap

I have tried it with a textureview and it works perferctly, i can take a screenshot of the cameraview but the camera is stretched.

like image 655
areyouSEARious Avatar asked Jan 17 '26 21:01

areyouSEARious


1 Answers

PreviewView now supports screenshot by calling PreviewView.getBitmap(). See: https://developer.android.com/reference/androidx/camera/view/PreviewView#getBitmap()

like image 160
Xi 张熹 Avatar answered Jan 20 '26 14:01

Xi 张熹