开发者

How to read the current frame buffer in android?

Is there a method to read th开发者_C百科e 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.


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.


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜