add flipping horizontally and photo quality

This commit is contained in:
darthpaul 2022-06-25 17:14:49 +01:00
parent c398370446
commit 1f3dd341d0
1 changed files with 2 additions and 1 deletions

View File

@ -233,6 +233,7 @@ class CameraXPreview(
return ImageCapture.Builder()
.setCaptureMode(CAPTURE_MODE_MAXIMIZE_QUALITY)
.setFlashMode(flashMode)
.setJpegQuality(config.photoQuality)
.setTargetAspectRatio(aspectRatio)
.setTargetRotation(rotation)
.build()
@ -305,7 +306,7 @@ class CameraXPreview(
val imageCapture = imageCapture ?: throw IllegalStateException("Camera initialization failed.")
val metadata = Metadata().apply {
isReversedHorizontal = frontCameraInUse
isReversedHorizontal = config.flipPhotos
}
val contentValues = ContentValues().apply {