BitmapUtil.java 文件源码

java
阅读 41 收藏 0 点赞 0 评论 0

项目:codedemos 作者:
public static Bitmap getRotatedImg(String path) {
    int angle = getBitmapRotation(path);
    Matrix matrix = new Matrix();
    matrix.postRotate(angle);
    Bitmap bitmap = BitmapFactory.decodeFile(path);
    try {
        bitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return bitmap;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号