feat: High quality mode (enableHighQualityPhotos
) (#194)
* feat: High Quality photo capture * prepare photo output for re-used settings * use high quality captures * Remove `enableVirtualDeviceFusion` as that is enabled by default * Clean up configuration, remove default * format * Update CameraViewManager.kt * rename * Update CameraProps.ts * Fix overriding `photoSettings` * Update CameraView+TakePhoto.swift * Update CameraView+TakePhoto.swift
This commit is contained in:
@@ -49,9 +49,6 @@ suspend fun CameraView.takePhoto(options: ReadableMap): WritableMap = coroutineS
|
||||
if (options.hasKey("enableDualCameraFusion")) {
|
||||
// TODO enableDualCameraFusion
|
||||
}
|
||||
if (options.hasKey("enableVirtualDeviceFusion")) {
|
||||
// TODO enableVirtualDeviceFusion
|
||||
}
|
||||
if (options.hasKey("enableAutoStabilization")) {
|
||||
// TODO enableAutoStabilization
|
||||
}
|
||||
|
@@ -39,7 +39,7 @@ import kotlin.math.min
|
||||
// TODO: Configurable FPS higher than 30
|
||||
// TODO: High-speed video recordings (export in CameraViewModule::getAvailableVideoDevices(), and set in CameraView::configurePreview()) (120FPS+)
|
||||
// TODO: configureSession() enableDepthData
|
||||
// TODO: configureSession() enableHighResolutionCapture
|
||||
// TODO: configureSession() enableHighQualityPhotos
|
||||
// TODO: configureSession() enablePortraitEffectsMatteDelivery
|
||||
// TODO: configureSession() colorSpace
|
||||
|
||||
@@ -55,7 +55,6 @@ import kotlin.math.min
|
||||
// TODO: takePhoto() photoCodec ("hevc" | "jpeg" | "raw")
|
||||
// TODO: takePhoto() qualityPrioritization
|
||||
// TODO: takePhoto() enableAutoRedEyeReduction
|
||||
// TODO: takePhoto() enableVirtualDeviceFusion
|
||||
// TODO: takePhoto() enableAutoStabilization
|
||||
// TODO: takePhoto() enableAutoDistortionCorrection
|
||||
// TODO: takePhoto() return with jsi::Value Image reference for faster capture
|
||||
@@ -66,7 +65,7 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner {
|
||||
// props that require reconfiguring
|
||||
var cameraId: String? = null // this is actually not a react prop directly, but the result of setting device={}
|
||||
var enableDepthData = false
|
||||
var enableHighResolutionCapture: Boolean? = null
|
||||
var enableHighQualityPhotos: Boolean? = null
|
||||
var enablePortraitEffectsMatteDelivery = false
|
||||
// use-cases
|
||||
var photo: Boolean? = null
|
||||
|
@@ -51,11 +51,11 @@ class CameraViewManager : SimpleViewManager<CameraView>() {
|
||||
view.enableDepthData = enableDepthData
|
||||
}
|
||||
|
||||
@ReactProp(name = "enableHighResolutionCapture")
|
||||
fun setEnableHighResolutionCapture(view: CameraView, enableHighResolutionCapture: Boolean?) {
|
||||
if (view.enableHighResolutionCapture != enableHighResolutionCapture)
|
||||
addChangedPropToTransaction(view, "enableHighResolutionCapture")
|
||||
view.enableHighResolutionCapture = enableHighResolutionCapture
|
||||
@ReactProp(name = "enableHighQualityPhotos")
|
||||
fun setEnableHighQualityPhotos(view: CameraView, enableHighQualityPhotos: Boolean?) {
|
||||
if (view.enableHighQualityPhotos != enableHighQualityPhotos)
|
||||
addChangedPropToTransaction(view, "enableHighQualityPhotos")
|
||||
view.enableHighQualityPhotos = enableHighQualityPhotos
|
||||
}
|
||||
|
||||
@ReactProp(name = "enablePortraitEffectsMatteDelivery")
|
||||
|
Reference in New Issue
Block a user