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;
}
BitmapUtil.java 文件源码
java
阅读 41
收藏 0
点赞 0
评论 0
项目:codedemos
作者:
评论列表
文章目录