Comments (5)
I even feel that it's a bug in react-native, because loading the image without even using the camera cause the issue.
I looked for multiple issues on github of people having this issue.
I also realised that I had this issue even before V4.
So, closing the issue. Thanks for your time on this one!
from react-native-vision-camera.
I use BitmapFactory.decodeFile
to get the width and height of the photo after capturing.
According to BitmapFactory.Options.outHeight
;
The resulting height of the bitmap. If inJustDecodeBounds is set to false, this will be height of the output bitmap after any scaling is applied. If true, it will be the height of the input image without any accounting for scaling.
We set inJustDecodeBounds
to true
, so this should be "the height of the input image without any accounting for scaling." - does Image.getSize
maybe perform display scaling already?
from react-native-vision-camera.
@mrousavy I tried to debug both source code and didn't any valid conclusion.
I noted indeed that when react load the Image there is a resize done only for the LandscapeLeft picture. (done here in the RN code). But why would it happen only for this orientation ? Other three looks fine. It has to be something else I feel.
The same app login in V3 works fine.
I noted that when react load the exif to get the orientation, I have the following results.
public static final int ORIENTATION_NORMAL = 1;
public static final int ORIENTATION_ROTATE_180 = 3;
public static final int ORIENTATION_ROTATE_270 = 8;
public static final int ORIENTATION_ROTATE_90 = 6;
ORIENTATION_ROTATE_90 -> Portrait
ORIENTATION_ROTATE_NORMAL -> LandscapeLeft
ORIENTATION_ROTATE_180 -> LandscapeRight
ORIENTATION_ROTATE_270 -> PortraitUpsideDown
Which is different from V3 :
ORIENTATION_ROTATE_180 -> LandscapeLeft
ORIENTATION_ROTATE_NORMAL -> LandscapeRight
Exif metadata are read here in react
from react-native-vision-camera.
hmm, interesting. Orientation is still something that's not fully supported (See #1891) - so I don't really have a lot of insights, other than that I'd be confident that CameraX' EXIF writer is probably a bit more battletested than the one I wrote in V3. So V4 should be correct, anything that's incorrect should probably be reported in the Google Issue Tracker, they test on a lot of devices. I only have 3 phones.
from react-native-vision-camera.
Okay, I will dig more into it and check with a sample CameraX native app. And submit an issue if necessary.
The root cause of this issue may be the same as for #2802
from react-native-vision-camera.
Related Issues (20)
- π Memory leak Android HOT 6
- π [iOS] Did someone manage to get to reasonable FPS with ML Kit Pose Detection (native frame processor plugin)? HOT 2
- π Lifecycle methods for native frame processors HOT 5
- π How to access GPS location tags in photo metadata? HOT 4
- π takePhoto() function working very slowly on Android HOT 3
- π§ A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction HOT 13
- π How does RNVC interact with OS camera settings? HOT 1
- π Is there a migration guide from V3 to V4? HOT 3
- π§ :react-native-vision-camera:compileDebugKotlin FAILED HOT 2
- Torch does not work on CodeScannerπ HOT 3
- π Hello, Which version of react-native-vision-camera supports RN 0.67? HOT 1
- Build failed with face-detector pluginπ§ HOT 3
- π Torch does not work on CodeScanner HOT 2
- π How to translate preview point to screen point with resizeMode contain? HOT 2
- π Error when switching front camera on iPhone HOT 2
- π On some Android devices, the camera image is very dark and almost invisible HOT 1
- π Different metadata frame count and decoded frame count HOT 4
- π Camera preview blank screen when using Skia Frame Processors HOT 10
- π Camera Preview is Stretched on ShadowLens App on a Samsung J6 (Android 10) HOT 1
- β¨ How can I save the video recording when the app state changes to "background" or "inactive". HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-vision-camera.