Fixed bitmap rotation and scaling
This commit is contained in:
parent
bd89b15de7
commit
4aac3757c6
1 changed files with 0 additions and 7 deletions
|
@ -95,13 +95,6 @@ public class BitmapWorkerTask extends AsyncTask<String, Void, Bitmap> {
|
||||||
} else {
|
} else {
|
||||||
matrix.postRotate(270);
|
matrix.postRotate(270);
|
||||||
}
|
}
|
||||||
if (imageView != null) {
|
|
||||||
if (pictureOrientation == 6 || pictureOrientation == 8) {
|
|
||||||
matrix.postScale(1, imageView.getMeasuredHeight() / (float) bm.getHeight());
|
|
||||||
} else {
|
|
||||||
matrix.postScale(imageView.getMeasuredHeight() / (float) bm.getHeight(), 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
thumbnail = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true);
|
thumbnail = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true);
|
||||||
if (thumbnail != bm) {
|
if (thumbnail != bm) {
|
||||||
bm.recycle();
|
bm.recycle();
|
||||||
|
|
Loading…
Reference in a new issue