[英]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.