android中如何读取当前帧缓冲区?

发布于 2024-10-02 16:43:37 字数 100 浏览 0 评论 0原文

有没有办法读取当前屏幕的帧缓冲区?我搜索了一些关于帧缓冲区的数据。有人使用了glReadPixels方法,但是信息不够。有谁知道如何详细读取当前帧缓冲区?

谢谢你的帮助。

Is there a method to read the frame buffer of the current screen? I searched some data about the frame buffer. Some one used the glReadPixels method, but the information was not enough. Does anyone know how to read the current frame buffer in detail?

Thanks for helping.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吻泪 2024-10-09 16:43:37

您真的想要屏幕帧缓冲区吗?或者您的应用程序创建的一些 OpenGL 表面?

如果是前者,请参阅
如何捕获Android设备屏幕内容?

如果是后者,那么 glReadPixels 就走在正确的轨道上。

Do you actually want the screen framebuffer? Or some OpenGL surface that your app has created?

If the former, see
How to capture the android device screen content?

If the latter, you are on the right track with glReadPixels.

抽个烟儿 2024-10-09 16:43:37

在cmd行中

  1. adb shell screencap -p /sdcard/abc.png
  2. adb pull /sdcard/abc.png
  3. 在adb目录中找到屏幕截图png文件。

根据 Chris Stratton 的编辑:

如果你要在 Java 代码中实现这个 cmd,需要 root 权限

感谢您指出我的错误!

in cmd line

  1. adb shell screencap -p /sdcard/abc.png
  2. adb pull /sdcard/abc.png
  3. find your screen capture png file in your adb directory.

Edit according to Chris Stratton :

If you gonna implement this cmd in Java code, root permission is needed

thanks for pointing out my mistake!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文