bm = BitmapFactory.decodeByteArray(data, 0, data.length); Bitmap bMapRotate; //保存图片时先进行旋转 Configuration config = getResources().getConfiguration(); if (config.orientation==1) {//竖拍 Matrix matrix = new Matrix(); matrix.reset(); matrix.setRotate(90) ; bMapRotate = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true); bm = bMapRotate; } 这样就可以解决了