Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FrontCamera shows upside-down image in <image> tag #67

Closed
sorabhsahu opened this issue Aug 16, 2017 · 12 comments
Closed

FrontCamera shows upside-down image in <image> tag #67

sorabhsahu opened this issue Aug 16, 2017 · 12 comments

Comments

@sorabhsahu
Copy link

FrontCamera show upside-down image in tag

@sorabhsahu sorabhsahu changed the title FrontCamera show upside-down image in <image> tag FrontCamera shows upside-down image in <image> tag Aug 16, 2017
@gran33
Copy link
Contributor

gran33 commented Aug 17, 2017

Hi @sorabhsahu, thanks for trying this library.
In order to help and actual resolve this issue we need some basic info, like:
iOS / Android?
Which react-native version?
Device / Simulator?
Steps to reproduce?
Any extra beneficial info?

Thanks in advance.

@kriptonhaz
Copy link

I've been facing the same issue
my environment so far
Android, RN 0.48.4, Device Xiaomi Redmi Note 4A, using a camerakit camera screen and the image displayed in tag from the uri that has been stored from the modul and the image is flipped and rotated.

so far I am using transform[{rotate:"180deg"}] for handling this issue, but can't get the right approach if the user use back camera (back camera is displaying correctly). If it not possible, can we just get the info if the image is taken with front or back camera?

thanks

@sorabhsahu
Copy link
Author

@gran33
OS - Android
RN - 0.43.3
On Device
Click a pic and show that image in image tag using source URI.

@kriptonhaz
Copy link

@gran33 I just tried to run on Nexus device and the camera (back or front) is correct not rotated like in xiaomi device. I tried to turn off mirror image in the camera phone setting but it still no change

@sorabhsahu
Copy link
Author

sorabhsahu commented Feb 28, 2018

Hi @kriptonhaz use https://github.com/react-community/react-native-image-picker , It's simple to implement.

@azundo
Copy link
Contributor

azundo commented Sep 25, 2018

I've done a bit of digging on this and for some reason if the Exif orientation tag is included and the photo is taken with the front-facing camera it is always flipped 180 deg. This behavior originates from this commit: e33b3dd

My Nexus phone doesn't include Exif orientation data (it handles rotating the bitmap itself) so the rotation step is skipped which explains why this affects some phones but not oethers.

I'm not sure why this behavior was added and what research it was based on but it doesn't seem to make sense to me. I'd be surprised if the majority of front-facing cameras create the image flipped by 180 degrees by default.

@georgian3688
Copy link

@gran33 I am facing the same issue. Image comes as upside down from front camera. Is there any solution for this?
React-native version -0.51
platform - android 7.0
device - Redmi 4A

@filipef101
Copy link

Not using this god forsaken package is the solution

@filipef101
Copy link

Or try with my fork, https://github.com/filipef101/react-native-camera-kit it might be fixed, I also exposed a few native methods on android to check if flash exists and other stuff

@Kazehiro
Copy link

Any update?
I'am facing same issue here, using MI A2 devices, React native 0.61.5,
when I try to Flip the Phone upside down while take a picture, the picture still upside down.

@adybuciuman
Copy link

any update?

@linoleum00
Copy link

Hello, any update on this ?? using react-native-camera-kit V8.0.4,

This fix Fix didn't work, it turn image sideway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants