mirror of
https://github.com/status-im/react-native-camera.git
synced 2025-02-24 01:38:18 +00:00
[BUG, ANDROID] width prop not works correctly when fixOrientation is enabled (#1629)
* add scan support for landscape mode * refactoring * fix errors * fix rotation * add landscape orientation support * fix exception * freeze preview image From PR https://github.com/lwansbrough/react-native-camera/pull/919 * fix width prop
This commit is contained in:
parent
35d962668c
commit
4fdd548611
@ -87,14 +87,14 @@ public class ResolveTakenPictureAsyncTask extends AsyncTask<Void, Void, Writable
|
||||
int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION,
|
||||
ExifInterface.ORIENTATION_UNDEFINED);
|
||||
|
||||
if (mOptions.hasKey("width")) {
|
||||
mBitmap = resizeBitmap(mBitmap, mOptions.getInt("width"));
|
||||
}
|
||||
|
||||
// Rotate the bitmap to the proper orientation if needed
|
||||
if (mOptions.hasKey("fixOrientation") && mOptions.getBoolean("fixOrientation") && orientation != ExifInterface.ORIENTATION_UNDEFINED) {
|
||||
mBitmap = rotateBitmap(mBitmap, getImageRotation(orientation));
|
||||
}
|
||||
|
||||
if (mOptions.hasKey("width")) {
|
||||
mBitmap = resizeBitmap(mBitmap, mOptions.getInt("width"));
|
||||
}
|
||||
|
||||
if (mOptions.hasKey("mirrorImage") && mOptions.getBoolean("mirrorImage")) {
|
||||
mBitmap = flipHorizontally(mBitmap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user