捕获的图像存储在横向位置,因此我想将其更改为肖像。
如何在不使用位图的情况下做到这一点?如果我使用下面的代码图像会损坏。所以只有我不想使用位图。
我的代码是:
Bitmap Out = null;
Bitmap Output = null;
Out = BitmapFactory.decodeByteArray(data, 0, data.length);
int w = Out.getWidth();
int h = Out.getHeight();
Matrix mtx = new Matrix();
mtx.postRotate(90);
Output = Bitmap.createBitmap(Out, 0, 0, w, h, mtx, true);
image = bitmaptoByte(Output);