//获得正常图片
private String picPath;//图片路径
public static Bitmap rotateImage(Bitmap src, getExif(picPath) {
Matrix matrix = new Matrix();
matrix.postRotate(degree);
src = Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix,
true);
return src;
}
//获得图片角度
private int getExif(final String path) {
ExifInterface exif;
int degree = 0;
try {
exif = new ExifInterface(path);
} catch (IOException e) {
e.printStackTrace();
exif = null;
}
if (exif != null) {
// 读取图片中相机方向信息
int ori = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,
ExifInt
private String picPath;//图片路径
public static Bitmap rotateImage(Bitmap src, getExif(picPath) {
Matrix matrix = new Matrix();
matrix.postRotate(degree);
src = Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix,
true);
return src;
}
//获得图片角度
private int getExif(final String path) {
ExifInterface exif;
int degree = 0;
try {
exif = new ExifInterface(path);
} catch (IOException e) {
e.printStackTrace();
exif = null;
}
if (exif != null) {
// 读取图片中相机方向信息
int ori = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION,
ExifInt