解决三星手机图片旋转

public static Bitmap getBitmap(String path){

Bitmap img = BitmapFactory.decodeFile(path);

Matrix matrix = new Matrix();

matrix.postRotate(readPictureDegree(path)); /*翻转*/

int width = img.getWidth();

int height =img.getHeight();

img = Bitmap.createBitmap(img, 0, 0, width, height, matrix, true);

return img;

}

你可能感兴趣的:(解决三星手机图片旋转)