简体   繁体   English

我可以在 image.close 之后获取缓冲区吗?

[英]Can I getBuffer after image.close?

I camera2 api, I save continuously image to Image[] and when want to capture picture, I call image.getPlanes()[0].getBuffer but app crashed and show error:我camera2 api,我将image连续保存到Image[] ,当想要捕获图片时,我调用image.getPlanes()[0].getBuffer但应用程序崩溃并显示错误:

Image is already close.

How can I getBuffer after image.close ?如何在 image.close 之后获取缓冲区? Thank you!谢谢!

You can't.你不能。

Don't call close() on the Image before you're done using it.在使用完成之前不要在 Image 上调用 close() 。

This may require you to increase the maxImageCount argument to your ImageReader, so you can hold on to more Images at the same time.这可能需要您增加 ImageReader 的 maxImageCount 参数,以便您可以同时保存更多图像。

暂无
暂无

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

相关问题 如何加载相机预览而不是图像 - How can I load camera preview instead of a image 保存图像之前如何获取元数据? - How can i get metadata before image will be saved? 在 Android Camera2 API 中。 我可以使用图像读取器 (YUV_420_888) 进行处理,使用另一个 (JPEG) 来捕获静止图像吗? - In Android Camera2 API. Can I use a image reader (YUV_420_888) for processing and another(JPEG) for capture still image? 我可以使用带有 MobileNet 或 Deeplab 图像分割模型的 Camerax 从相机进行实时图像分割吗? - Can I use Camerax with MobileNet or Deeplab image segmentation models to do real-time image segmentation from camera? 如何清除图像中的条纹? android camera2 fps或banding问题 - How can I clear off the stripes in the image? android camera2 fps or banding problem 即使关闭应用程序后,我也可以在一定时间间隔下运行后台服务吗 - Can I Make A Background Service That runs at certain intervals of time even after closing the Application 2秒单击捕获按钮后捕获图像的延迟 - 2Seconds Delay for capturing image after clicking the capture button 我如何获得相机 2 中 TextureView 预览大小的图像 - How can i get the image as in the preview size of TextureView in camera 2 在单独的线程中关闭CameraDevice - Close CameraDevice in a seperate thread 如何避免将捕获的图像保存在我的设备中? - How do I avoid saving captured image in my device?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM