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

On android tablet photo is 90 or 180 degrees rotated when I take a picture #801

Open
3 tasks done
marioklaver opened this issue Jul 20, 2022 · 3 comments
Open
3 tasks done

Comments

@marioklaver
Copy link

marioklaver commented Jul 20, 2022

Bug Report

Problem

I have an Android tablet (Zebra ET51 with android 10)I. If I have the tablet in landscape mode and take a picture, the picture is upside down. If I have the tablet in portrait mode and take a picture, the picture is 90 degrees rotated. In the preview in the camera app everything looks fine, but when I accept the photo and return to my cordova app, the picture is rotated.
This only occurs with the camera on the back. The camera on the front is working fine.

What is expected to happen?

I expect the photo to be oriented as in the preview of the camera app.

What does actually happen?

The photo is 90 or 180 degrees rotated

Information

$ cordova platform ls
Installed platforms:
android 10.1.2
cordova-plugin-camera: ^6.0.0

Command or Code

navigator.camera.getPicture(
  (imageData) => {
    onGetPictureSuccess({ dataURL: `data:image/jpeg;base64,${imageData}`, photoUuid: uuid() });
  },
  onGetPictureFail,
  {
    quality: 25,
    destinationType: Camera.DestinationType.DATA_URL,
    cameraDirection: Camera.Direction.BACK,
    correctOrientation: false,
  },
);

I used all kind of cameraOptions but nothing seems to work.

Environment, Platform, Device

Android 10 tablet (Zebra ET51)
cordova: 11.0.0
cordova-android 10.1.2
cordova-plugin-camera: 6.0.0

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@cumpstey
Copy link

I reported this to Zebra for a TC21. It was a bug in their camera app - it wasn't correctly adding exif orientation metadata to the image. They fixed it, but presumably not for all their devices if you're having trouble with a different model.

@giuliastully
Copy link

Hi, I have the same problem for smartphones with Android 13.
How can I do?

@mariusvn
Copy link

correctOrientation must be set to true

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

4 participants