简体   繁体   English

如何在 android 中保存从相机拍摄的图像

[英]How to save captured image from camera in android

The official sample of Camera2Basic for capturing images from camera. Camera2Basic 的官方示例,用于从相机捕获图像。
It only shows the captured image in an activity but does not save the image to external storage它仅在活动中显示捕获的图像,但不会将图像保存到外部存储

How to save that image to external storage?如何将该图像保存到外部存储?

I searched a lot over the internet for this, but there are all of the deprecated as of Android 11 (API 30).我在互联网上进行了很多搜索,但从 Android 11(API 30)开始,所有这些都已弃用。
Thanks!谢谢!

use camerax lib from google which is part android jetpack使用来自 google 的 camerax lib,它是 android jetpack 的一部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM