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

[camera-core] Fix front camera callback #5004

Merged
merged 1 commit into from
May 13, 2022
Merged

[camera-core] Fix front camera callback #5004

merged 1 commit into from
May 13, 2022

Conversation

ccen-stripe
Copy link
Contributor

@ccen-stripe ccen-stripe commented May 12, 2022

Summary

Camera1Adapter sends upside down images when using front face camera. The two changes are made

  • Check CameraInfo for currentCameraId instead of Camera.CameraInfo.CAMERA_FACING_BACK
  • When currentCameraId is front facing camera, apply the rotate counterclock-wise, this would ensure the image is in the correct orientation

Motivation

fix camera callback

Testing

  • Added tests
  • Modified tests
  • Manually verified - Verified with stripecardscan example app - the CARDSCANSHEET was not able to correctly scan a card in front camera, this change fixed it.

Screenshots

Before After
before screenshot after screenshot

Changelog

[Fixed] Let front camera callback not return an upside down image

@ccen-stripe ccen-stripe requested a review from awush-stripe as a code owner May 12, 2022 23:59
@ccen-stripe ccen-stripe merged commit 7b155c1 into master May 13, 2022
@ccen-stripe ccen-stripe deleted the ccen/selfieML1 branch May 13, 2022 18:21
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

Successfully merging this pull request may close these issues.

2 participants