Captured image always shows landscape and setRotate cannot be resolved

后端 未结 2 1863
梦谈多话
梦谈多话 2021-01-26 13:57

There are quite a few similar topics and issues around here and I follow this . But I get error.

My Code

@Override

protected void onAct         


        
相关标签:
2条回答
  • 2021-01-26 14:37

    I guess you imported the wrong Matrix class, you should import android.graphics.Matrix, not android.opengl.Matrix, please double check.

    0 讨论(0)
  • 2021-01-26 14:49

    Change to this Bitmap rotatedBitmap = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(),matrix, true);

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