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

Selfie Camera image upside down #118

Open
DevSpur opened this issue Mar 31, 2024 · 1 comment
Open

Selfie Camera image upside down #118

DevSpur opened this issue Mar 31, 2024 · 1 comment

Comments

@DevSpur
Copy link

DevSpur commented Mar 31, 2024

When using the selfie camera after taking photo the image loads upside down, I need to upload this image to a server and it needs to be the right way up.

  • Unity version: 2022.3.22f1
  • Platform: iOS
  • Device: Iphone 14 pro max
  • How did you download the plugin: Package Manager.
@yasirkula
Copy link
Owner

Mobile cameras insert EXIF metadata into those images, stating how many degrees to rotate an image to display it properly. If an image viewer respects that EXIF metadata, the image will be displayed correctly. For example, I'd expect all mobile devices to display those images correctly. However, you may want to hardcode that rotation to the image to support all image viewers. One way to achieve this with NativeCamera is to call LoadImageAtPath to load the image into a Texture2D and then save it as PNG or JPEG via texture.EncodeToPNG/EncodeToJPG. The resulting image should have correct orientation.

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

No branches or pull requests

2 participants