【发布时间】:2012-08-06 16:45:43
【问题描述】:
我在那里读了很多帖子?但我没有找到正确的答案。
我尝试这样做:
@Override
public void onPictureTaken(byte[] paramArrayOfByte, Camera paramCamera) {
try {
Bitmap bitmap = BitmapFactory.decodeByteArray(paramArrayOfByte, 0,
paramArrayOfByte.length);
int width = bitmap.getWidth();
int height = bitmap.getHeight();
FileOutputStream os = new ileOutputStream(Singleton.mPushFilePath);
Matrix matrix = new Matrix();
matrix.postRotate(90);
Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0, width,
height, matrix, false);
resizedBitmap.compress(Bitmap.CompressFormat.JPEG, 95, os);
os.close();
...
有没有办法在不使用 BitmapFactory 的情况下旋转图片?我想旋转图片而不损失质量!
【问题讨论】:
-
这里有一个很好的解决方案:stackoverflow.com/questions/2225363/…
-
这很棒,但它是 C#?
-
抱歉 - 没有阅读标签!
标签: android bitmap bitmapfactory