Skip to content

Fix #134 - Ability to scale camera preview horizontally and vertically on Android#160

Open
centrolutions wants to merge 2 commits intoafriscic:masterfrom
centrolutions:feature/ability-to-scale-camera-preview
Open

Fix #134 - Ability to scale camera preview horizontally and vertically on Android#160
centrolutions wants to merge 2 commits intoafriscic:masterfrom
centrolutions:feature/ability-to-scale-camera-preview

Conversation

@centrolutions
Copy link
Copy Markdown

  • Added CameraPreviewScaleY and CameraPreviewScaleX properties to the camera view and implemented updates via the UpdatePreviewScale on the camera manager.
  • Updated the test app to rotate horizontally and vertically when the "R" button is pressed in order to demonstrate the new scale properties

As far as I know, this is not a problem on iOS -- only with some Android devices. I did not provide an implementation in the iOS platform-specific code.

The reason this is needed is some Android devices do not provide the correct camera orientation. Thus, the PreviewView cannot orient itself correctly to the user's perspective.

An example of this is a Microtouch IDC 15-inch tablet. The screen orientation can be manually set (no internal accelerometer or gyro), but when you do this, the camera's orientation is not changed. This leaves the camera preview upside down or sideways in some cases.

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.

1 participant