How to save bitmap from GLSurfaceView (Only bitmap, not whole texture)

前端 未结 1 365
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 22:44

I am using this code to give multiple effect on bitmap that is on GlSurfaceView. apply-effects-on-image-using-effects

Now, I want to save the bitmap. They have given

相关标签:
1条回答
  • 2020-12-09 23:14

    If you can get the dimensions of the image, you can get the exact position of the bitmap.

    Let the image dimensions be x and y, and get the screen dimensions following this post. Let that be a and b.

    Your starting position will be ((a-x)/2, (b-y)/2).

    Use this to crop your image.

    0 讨论(0)
提交回复
热议问题