Android OpenGL Screenshot

后端 未结 2 2096
时光取名叫无心
时光取名叫无心 2020-12-05 12:29

I\'ve searched a lot about taking screenshot of my OpenGL object on Android and come up with this solution. It worked great but in my case I have camera view and opengl view

2条回答
  •  情书的邮戳
    2020-12-05 13:03

    The solution you mentioned is using a Bitmap.Config.RGB_565 which doesn't support alpha channels.

    Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
    

    Instead you should use Bitmap.Config.ARGB_8888 or Bitmap.Config.ARGB_4444.

提交回复
热议问题