mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2024-12-29 08:40:16 +01:00
fix #171, try avoiding capturing rotated photos
This commit is contained in:
parent
8fae1b167a
commit
9548d6621d
@ -578,11 +578,12 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||
|
||||
mCameraState = STATE_PICTURE_TAKEN
|
||||
mRotationAtCapture = mActivity.mLastHandledOrientation
|
||||
val jpegOrientation = (mSensorOrientation + compensateDeviceRotation(mRotationAtCapture, mUseFrontCamera)) % 360
|
||||
val captureBuilder = mCameraDevice!!.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE).apply {
|
||||
addTarget(mImageReader!!.surface)
|
||||
setFlashAndExposure(this)
|
||||
set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE)
|
||||
set(CaptureRequest.JPEG_ORIENTATION, mSensorOrientation)
|
||||
set(CaptureRequest.JPEG_ORIENTATION, jpegOrientation)
|
||||
set(CaptureRequest.CONTROL_CAPTURE_INTENT, CaptureRequest.CONTROL_CAPTURE_INTENT_STILL_CAPTURE)
|
||||
set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE, getFrameRange())
|
||||
if (mZoomRect != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user