android - How to get right camera preview independent from the screen orientation? -
why in portrait
screen orientation photographic camera surface rotated -90 degrees "90 degrees anticlockwise". want photographic camera preview normal regardless of screen orientation. how can accomplish that.
did tried this:
mcam.setdisplayorientation(90);
utilize within surfacechanged(...)
setdisplayorientation set clockwise rotation of preview display in degrees. affects preview frames , image displayed after snapshot. method useful portrait mode applications. note preview display of front-facing cameras flipped horizontally before rotation, is, image reflected along central vertical axis of photographic camera sensor. users can see looking mirror.
this not impact order of byte array passed in onpreviewframe(byte[], camera), jpeg pictures, or recorded videos. method not allowed called during preview.
android camera android-camera screen-orientation
No comments:
Post a Comment