Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个在某个点(触发事件时)捕获网络摄像头的应用程序,例如拍摄相机快照并将快照编码为 base64。但是看网上的例子,他们首先将该快照绘制到画布上,然后将该画布转换为 base64。有没有办法跳过“绘图到画布”部分?
不,画布是在浏览器中读取像素的唯一可能方法。
这就是为什么必须首先将视频流绘制到画布上的原因。