0
点赞
收藏
分享

微信扫一扫

android中Bitmap转换角度

窗外路过了谁 2023-04-08 阅读 87


public static Bitmap changeBitmap(Bitmap bitmap){
     
            Matrix matrix = new Matrix();
            //转换角度 rotation 
            int rotation = -90;
            matrix.setRotate(rotation);
            
            return  Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
            
    }


举报

相关推荐

0 条评论