Rotate a saved bitmap in android

后端 未结 5 1007
终归单人心
终归单人心 2020-12-05 12:11

I am saving an image from the camera that was in landscape mode. so it gets saved in landscape mode and then i apply an overlay onto it that too is in landscape mode. I want

5条回答
  •  佛祖请我去吃肉
    2020-12-05 12:53

    Use a Matrix.rotate(degrees) and draw the Bitmap to it's own Canvas using that rotating matrix. I don't know though if you might have to make a copy of the bitmap before drawing.

    Use Bitmap.compress(...) to compress your bitmap to an outputstream.

提交回复
热议问题