diff --git a/app/src/main/assets/frames/02_black_border.json b/app/src/main/assets/frames/02_black_border.json index bf61f427..b779a0b1 100644 --- a/app/src/main/assets/frames/02_black_border.json +++ b/app/src/main/assets/frames/02_black_border.json @@ -26,10 +26,9 @@ "type": "text", "textType": "DEVICE_MODEL", "alignment": "CENTER", - "fontSize": 28, + "fontSize": 24, "color": "#C6AE7A", "fontWeight": "BOLD", - "fontFamily": "SlacksideOne.ttf", "line": 1 }, { diff --git a/app/src/main/assets/frames/03_no_frame.json b/app/src/main/assets/frames/03_no_frame.json index a6e8a5c6..ae4f4550 100644 --- a/app/src/main/assets/frames/03_no_frame.json +++ b/app/src/main/assets/frames/03_no_frame.json @@ -28,7 +28,6 @@ "fontSize": 16, "color": "#FFFFFF", "fontWeight": "BOLD", - "fontFamily": "SlacksideOne.ttf", "line": 1 }, { diff --git a/app/src/main/java/com/hinnka/mycamera/frame/FrameRenderer.kt b/app/src/main/java/com/hinnka/mycamera/frame/FrameRenderer.kt index 9f219165..885341b1 100644 --- a/app/src/main/java/com/hinnka/mycamera/frame/FrameRenderer.kt +++ b/app/src/main/java/com/hinnka/mycamera/frame/FrameRenderer.kt @@ -184,6 +184,19 @@ class FrameRenderer(private val context: Context) { // 叠加模式:绘制从全透明到半透明的渐变背景 val overlayTop = (originalBitmap.height - frameHeight).toFloat() + // 创建线性渐变:从顶部全透明到底部半透明 + val gradientShader = LinearGradient( + 0f, overlayTop, + 0f, outputHeight.toFloat(), + Color.TRANSPARENT, + layout.backgroundColor, + Shader.TileMode.CLAMP + ) + backgroundPaint.shader = gradientShader + canvas.drawRect(0f, overlayTop, outputWidth.toFloat(), outputHeight.toFloat(), backgroundPaint) + backgroundPaint.shader = null // 重置 shader + + // 绘制水印内容 drawFrameContent( canvas, template.elements, metadata, @@ -596,12 +609,7 @@ class FrameRenderer(private val context: Context) { val intrinsicH = drawable.intrinsicHeight return if (intrinsicW > 0 && intrinsicH > 0) { val ratio = (intrinsicW.toFloat() / intrinsicH.toFloat()) - if (ratio > 3f) { - // 超宽图标,限制最大宽度 - size * 3 to size - } else { - (size * ratio).toInt() to size - } + (size * ratio).toInt() to size } else { // 无内在尺寸,退回到方形 size to size diff --git a/app/src/main/java/com/hinnka/mycamera/gallery/PhotoManager.kt b/app/src/main/java/com/hinnka/mycamera/gallery/PhotoManager.kt index 3df68dd0..8bf225b5 100644 --- a/app/src/main/java/com/hinnka/mycamera/gallery/PhotoManager.kt +++ b/app/src/main/java/com/hinnka/mycamera/gallery/PhotoManager.kt @@ -310,9 +310,9 @@ object PhotoManager { ratio = aspectRatio, cropRegion = cropRegion, rotation = rotation, - sharpening = 0.2f, - noiseReduction = 0f, - chromaNoiseReduction = 0.25f, + sharpening = if (sharpeningValue == 0f) 0.4f else sharpeningValue, + noiseReduction = noiseReductionValue, + chromaNoiseReduction = if (chromaNoiseReductionValue == 0f) 0.25f else chromaNoiseReductionValue, ) metadataFile.writeText(metadataWithInfo.toJson()) val dngDataBytes = ByteArrayOutputStream().use { dngData -> diff --git a/app/src/main/java/com/hinnka/mycamera/lut/LutImageProcessor.kt b/app/src/main/java/com/hinnka/mycamera/lut/LutImageProcessor.kt index 040052b9..bc0fa4de 100644 --- a/app/src/main/java/com/hinnka/mycamera/lut/LutImageProcessor.kt +++ b/app/src/main/java/com/hinnka/mycamera/lut/LutImageProcessor.kt @@ -948,27 +948,22 @@ class LutImageProcessor { // 2. 高光/阴影调整(分区调整,基于亮度 mask) float luma = dot(color.rgb, vec3(0.299, 0.587, 0.114)); - float shadowMask = smoothstep(0.5, 0.0, luma); // 暗部 - float highlightMask = smoothstep(0.5, 1.0, luma); // 亮部 - - // --- 阴影处理 (Shadows) --- - float shadowIntensity = uShadows * shadowMask; - color.rgb += color.rgb * shadowIntensity * 0.6; - - // --- 高光处理 (Highlights) --- - float targetLuma = luma; - if (uHighlights < 0.0) { - float compressionFactor = 1.0 + (uHighlights * highlightMask * 0.2); - targetLuma = luma * compressionFactor; - targetLuma = ((targetLuma - 0.5) * 1.2) + 0.5; // 可选:微调对比度 + float highlightMask = smoothstep(0.5, 1.0, luma); + float shadowMask = smoothstep(0.5, 0.0, luma); + float highlightFactor; + if (uHighlights > 0.0) { + highlightFactor = 1.0 + uHighlights * 0.7; } else { - targetLuma = mix(luma, 1.0, uHighlights * highlightMask * 0.5); + highlightFactor = 1.0 + uHighlights * 0.3; } - color.rgb = color.rgb * (targetLuma / (luma + 0.00001)); - if (uHighlights < 0.0) { - vec3 gray = vec3(luma); - color.rgb = mix(gray, color.rgb, 1.0 - uHighlights * 0.2); + color.rgb = mix(color.rgb, color.rgb * highlightFactor, highlightMask); + vec3 shadowTarget; + if (uShadows > 0.0) { + shadowTarget = mix(color.rgb, vec3(1.0) * luma, uShadows * 0.2) + (color.rgb * uShadows * 0.5); + } else { + shadowTarget = color.rgb * (1.0 + uShadows * 0.5); } + color.rgb = mix(color.rgb, shadowTarget, shadowMask); // 3. 对比度(围绕中灰点调整) color.rgb = (color.rgb - 0.5) * uContrast + 0.5; diff --git a/app/src/main/java/com/hinnka/mycamera/lut/Shaders.kt b/app/src/main/java/com/hinnka/mycamera/lut/Shaders.kt index bb12efb3..f10be36f 100644 --- a/app/src/main/java/com/hinnka/mycamera/lut/Shaders.kt +++ b/app/src/main/java/com/hinnka/mycamera/lut/Shaders.kt @@ -193,27 +193,22 @@ object Shaders { // 2. 高光/阴影调整(分区调整,基于亮度 mask) float luma = dot(color.rgb, vec3(0.299, 0.587, 0.114)); - float shadowMask = smoothstep(0.5, 0.0, luma); // 暗部 - float highlightMask = smoothstep(0.5, 1.0, luma); // 亮部 - - // --- 阴影处理 (Shadows) --- - float shadowIntensity = uShadows * shadowMask; - color.rgb += color.rgb * shadowIntensity * 0.6; - - // --- 高光处理 (Highlights) --- - float targetLuma = luma; - if (uHighlights < 0.0) { - float compressionFactor = 1.0 + (uHighlights * highlightMask * 0.2); - targetLuma = luma * compressionFactor; - targetLuma = ((targetLuma - 0.5) * 1.2) + 0.5; // 可选:微调对比度 + float highlightMask = smoothstep(0.5, 1.0, luma); + float shadowMask = smoothstep(0.5, 0.0, luma); + float highlightFactor; + if (uHighlights > 0.0) { + highlightFactor = 1.0 + uHighlights * 0.7; } else { - targetLuma = mix(luma, 1.0, uHighlights * highlightMask * 0.5); + highlightFactor = 1.0 + uHighlights * 0.3; } - color.rgb = color.rgb * (targetLuma / (luma + 0.00001)); - if (uHighlights < 0.0) { - vec3 gray = vec3(luma); - color.rgb = mix(gray, color.rgb, 1.0 - uHighlights * 0.2); + color.rgb = mix(color.rgb, color.rgb * highlightFactor, highlightMask); + vec3 shadowTarget; + if (uShadows > 0.0) { + shadowTarget = mix(color.rgb, vec3(1.0) * luma, uShadows * 0.2) + (color.rgb * uShadows * 0.5); + } else { + shadowTarget = color.rgb * (1.0 + uShadows * 0.5); } + color.rgb = mix(color.rgb, shadowTarget, shadowMask); // 3. 对比度(围绕中灰点调整) color.rgb = (color.rgb - 0.5) * uContrast + 0.5; diff --git a/app/src/main/java/com/hinnka/mycamera/raw/RawDemosaicProcessor.kt b/app/src/main/java/com/hinnka/mycamera/raw/RawDemosaicProcessor.kt index fc1e9f0b..26b75280 100644 --- a/app/src/main/java/com/hinnka/mycamera/raw/RawDemosaicProcessor.kt +++ b/app/src/main/java/com/hinnka/mycamera/raw/RawDemosaicProcessor.kt @@ -336,27 +336,22 @@ class RawDemosaicProcessor { // 2. 高光/阴影调整(分区调整,基于亮度 mask) float luma = dot(color.rgb, vec3(0.299, 0.587, 0.114)); - float shadowMask = smoothstep(0.5, 0.0, luma); // 暗部 - float highlightMask = smoothstep(0.5, 1.0, luma); // 亮部 - - // --- 阴影处理 (Shadows) --- - float shadowIntensity = uShadows * shadowMask; - color.rgb += color.rgb * shadowIntensity * 0.6; - - // --- 高光处理 (Highlights) --- - float targetLuma = luma; - if (uHighlights < 0.0) { - float compressionFactor = 1.0 + (uHighlights * highlightMask * 0.2); - targetLuma = luma * compressionFactor; - targetLuma = ((targetLuma - 0.5) * 1.2) + 0.5; // 可选:微调对比度 + float highlightMask = smoothstep(0.5, 1.0, luma); + float shadowMask = smoothstep(0.5, 0.0, luma); + float highlightFactor; + if (uHighlights > 0.0) { + highlightFactor = 1.0 + uHighlights * 0.7; } else { - targetLuma = mix(luma, 1.0, uHighlights * highlightMask * 0.5); + highlightFactor = 1.0 + uHighlights * 0.3; } - color.rgb = color.rgb * (targetLuma / (luma + 0.00001)); - if (uHighlights < 0.0) { - vec3 gray = vec3(luma); - color.rgb = mix(gray, color.rgb, 1.0 - uHighlights * 0.2); + color.rgb = mix(color.rgb, color.rgb * highlightFactor, highlightMask); + vec3 shadowTarget; + if (uShadows > 0.0) { + shadowTarget = mix(color.rgb, vec3(1.0) * luma, uShadows * 0.2) + (color.rgb * uShadows * 0.5); + } else { + shadowTarget = color.rgb * (1.0 + uShadows * 0.5); } + color.rgb = mix(color.rgb, shadowTarget, shadowMask); // 3. 对比度(围绕中灰点调整) color.rgb = (color.rgb - 0.5) * uContrast + 0.5; diff --git a/app/src/main/java/com/hinnka/mycamera/ui/camera/CameraTopSheet.kt b/app/src/main/java/com/hinnka/mycamera/ui/camera/CameraTopSheet.kt index 8dd34d75..a19f3718 100644 --- a/app/src/main/java/com/hinnka/mycamera/ui/camera/CameraTopSheet.kt +++ b/app/src/main/java/com/hinnka/mycamera/ui/camera/CameraTopSheet.kt @@ -166,13 +166,19 @@ fun CameraTopSheet( onClick = onFilterManageClick, modifier = Modifier.weight(1f) ) - Spacer(modifier = Modifier.weight(1f)) +// Spacer(modifier = Modifier.weight(1f)) + QuickSettingButton( + title = stringResource(R.string.settings_title), + icon = Icons.Default.ChevronRight, + onClick = onMoreSettingsClick, + modifier = Modifier.weight(1f) + ) } - Spacer(modifier = Modifier.height(24.dp)) +// Spacer(modifier = Modifier.height(24.dp)) // More Settings Button - Surface( + /*Surface( onClick = onMoreSettingsClick, color = Color.White.copy(alpha = 0.05f), shape = RoundedCornerShape(12.dp), @@ -212,7 +218,7 @@ fun CameraTopSheet( modifier = Modifier.size(20.dp) ) } - } + }*/ } } } diff --git a/app/src/main/java/com/hinnka/mycamera/ui/components/ColorRecipePanel.kt b/app/src/main/java/com/hinnka/mycamera/ui/components/ColorRecipePanel.kt index ee3cfc35..67cb2551 100644 --- a/app/src/main/java/com/hinnka/mycamera/ui/components/ColorRecipePanel.kt +++ b/app/src/main/java/com/hinnka/mycamera/ui/components/ColorRecipePanel.kt @@ -35,28 +35,25 @@ fun ColorRecipePanel( var selectedTabIndex by remember { mutableIntStateOf(0) } val tabs = listOf( - R.string.recipe_tab_basic, - R.string.recipe_tab_color, R.string.recipe_tab_light, + R.string.recipe_tab_color, R.string.recipe_tab_texture, ) val parameterGroups = listOf( listOf( RecipeParam.EXPOSURE, RecipeParam.CONTRAST, - RecipeParam.SATURATION + RecipeParam.HIGHLIGHTS, + RecipeParam.SHADOWS, ), listOf( + RecipeParam.SATURATION, RecipeParam.TEMPERATURE, RecipeParam.TINT, RecipeParam.COLOR ), listOf( - RecipeParam.HIGHLIGHTS, - RecipeParam.SHADOWS, - RecipeParam.VIGNETTE - ), - listOf( + RecipeParam.VIGNETTE, RecipeParam.FILM_GRAIN, RecipeParam.FADE, RecipeParam.BLEACH_BYPASS diff --git a/app/src/main/java/com/hinnka/mycamera/ui/gallery/PhotoEditScreen.kt b/app/src/main/java/com/hinnka/mycamera/ui/gallery/PhotoEditScreen.kt index 936bff3f..849bb047 100644 --- a/app/src/main/java/com/hinnka/mycamera/ui/gallery/PhotoEditScreen.kt +++ b/app/src/main/java/com/hinnka/mycamera/ui/gallery/PhotoEditScreen.kt @@ -126,15 +126,18 @@ fun PhotoEditScreen( showOrigin ) { if (currentPhoto == null) return@LaunchedEffect - isLoadingPreview = previewBitmap == null previewBitmap = withContext(Dispatchers.IO) { viewModel.getPreviewBitmap(currentPhoto, useGlobalEdit = true, showOrigin = showOrigin) } + isLoadingPreview = false + } + + LaunchedEffect(currentPhoto) { + if (currentPhoto == null) return@LaunchedEffect thumbnailBitmap = withContext(Dispatchers.IO) { viewModel.loadThumbnail(currentPhoto) } - isLoadingPreview = false } LaunchedEffect(editLutId) { @@ -233,7 +236,8 @@ fun PhotoEditScreen( }, colors = TopAppBarDefaults.topAppBarColors( containerColor = Color.Black - ) + ), + windowInsets = WindowInsets(0, 0, 0, 0) ) } // 预览区域 @@ -351,19 +355,30 @@ fun PhotoEditScreen( } if (editTab == 0) { + val currentInfo = availableLuts.find { it.id == editLutId } + val lutTitle = currentInfo?.getName() ?: "" Spacer(modifier = Modifier.height(16.dp)) - // LUT 选择器 Row( modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically ) { - Text( - text = stringResource(R.string.filter), - color = Color.White, - fontSize = 16.sp - ) + Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { + Text( + text = stringResource(R.string.filter).uppercase(), + color = Color.White.copy(alpha = 0.4f), + fontSize = 10.sp, + fontWeight = FontWeight.Bold, + letterSpacing = 1.sp + ) + Text( + text = if (lutTitle.isEmpty()) stringResource(R.string.none) else lutTitle, + color = Color.White, + fontSize = 16.sp, + fontWeight = FontWeight.Bold + ) + } if (editLutId != null) { Row( @@ -371,7 +386,7 @@ fun PhotoEditScreen( .clip(RoundedCornerShape(16.dp)) .background(Color.White.copy(alpha = 0.1f)) .clickable { showLutEditDialog = true } - .padding(horizontal = 10.dp, vertical = 4.dp), + .padding(horizontal = 10.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp) ) { @@ -384,7 +399,8 @@ fun PhotoEditScreen( Text( text = stringResource(R.string.color_recipe), color = Color.White, - fontSize = 11.sp + fontSize = 11.sp, + fontWeight = FontWeight.Medium ) } } diff --git a/app/src/main/java/com/hinnka/mycamera/ui/settings/FilterManagementScreen.kt b/app/src/main/java/com/hinnka/mycamera/ui/settings/FilterManagementScreen.kt index e9504def..efac5c6a 100644 --- a/app/src/main/java/com/hinnka/mycamera/ui/settings/FilterManagementScreen.kt +++ b/app/src/main/java/com/hinnka/mycamera/ui/settings/FilterManagementScreen.kt @@ -135,6 +135,37 @@ fun FilterManagementScreen( val categoryOrder by viewModel.categoryOrder.collectAsState(emptyList()) var showCategoryManagement by remember { mutableStateOf(false) } + val allText = stringResource(R.string.category_all) + val customText = stringResource(R.string.custom) + + var selectedTabIndex by remember { mutableIntStateOf(0) } + val categories = remember(localLutList, categoryOrder, allText, customText) { + // 动态分类提取 + val dynamicCategories = localLutList.map { it.category } + .distinct() + .filter { it.isNotEmpty() && it != allText && it != customText } + + // 合并排序中的分类(即使是空的)和数据中实际存在的分类 + val allUniqueCategories = (categoryOrder + dynamicCategories).distinct() + + // 按保存的排序排列;新分类(不在排序中的)排在后面 + val sortedDynamic = allUniqueCategories.sortedWith(compareBy { cat -> + val index = categoryOrder.indexOf(cat) + if (index == -1) Int.MAX_VALUE else index + }.thenBy { it }) + + listOf(allText, customText) + sortedDynamic + } + val filteredLutList = remember(selectedTabIndex, localLutList, categories) { + if (selectedTabIndex >= categories.size) return@remember localLutList + + when (selectedTabIndex) { + 0 -> localLutList // All + 1 -> localLutList.filter { !it.isBuiltIn } // Custom + else -> localLutList.filter { it.category == categories[selectedTabIndex] } + } + } + // 批量文件选择器 val lutFilePicker = rememberLauncherForActivityResult( contract = ActivityResultContracts.OpenMultipleDocuments() @@ -146,9 +177,6 @@ fun FilterManagementScreen( } } - val allText = stringResource(R.string.category_all) - val customText = stringResource(R.string.custom) - // 分类删除确认对话框 if (categoryToDelete != null) { val target = categoryToDelete!! @@ -265,14 +293,14 @@ fun FilterManagementScreen( if (isSelectionMode) { // 全选按钮 IconButton(onClick = { - if (selectedIds.size == availableLuts.size) { - selectedIds = emptySet() + selectedIds = if (selectedIds.size == filteredLutList.size) { + emptySet() } else { - selectedIds = availableLuts.map { it.id }.toSet() + filteredLutList.map { it.id }.toSet() } }) { Icon( - imageVector = if (selectedIds.size == availableLuts.size) Icons.Default.CheckBox else Icons.Default.CheckBoxOutlineBlank, + imageVector = if (selectedIds.size == filteredLutList.size) Icons.Default.CheckBox else Icons.Default.CheckBoxOutlineBlank, contentDescription = "Select All", tint = Color.White ) @@ -375,26 +403,6 @@ fun FilterManagementScreen( } Column(modifier = Modifier.weight(1f)) { - val categories = remember(localLutList, categoryOrder, allText, customText) { - // 动态分类提取 - val dynamicCategories = localLutList.map { it.category } - .distinct() - .filter { it.isNotEmpty() && it != allText && it != customText } - - // 合并排序中的分类(即使是空的)和数据中实际存在的分类 - val allUniqueCategories = (categoryOrder + dynamicCategories).distinct() - - // 按保存的排序排列;新分类(不在排序中的)排在后面 - val sortedDynamic = allUniqueCategories.sortedWith(compareBy { cat -> - val index = categoryOrder.indexOf(cat) - if (index == -1) Int.MAX_VALUE else index - }.thenBy { it }) - - listOf(allText, customText) + sortedDynamic - } - - var selectedTabIndex by remember { mutableStateOf(0) } - // 修正 Tab 越界(如果分类消失了) LaunchedEffect(categories.size) { if (selectedTabIndex >= categories.size) { @@ -402,16 +410,6 @@ fun FilterManagementScreen( } } - val filteredLutList = remember(selectedTabIndex, localLutList, categories) { - if (selectedTabIndex >= categories.size) return@remember localLutList - - when (selectedTabIndex) { - 0 -> localLutList // All - 1 -> localLutList.filter { !it.isBuiltIn } // Custom - else -> localLutList.filter { it.category == categories[selectedTabIndex] } - } - } - val copy_suffix = stringResource(R.string.copy_suffix) ScrollableTabRow( @@ -430,8 +428,10 @@ fun FilterManagementScreen( categories.forEachIndexed { index, category -> Tab( selected = selectedTabIndex == index, - onClick = { selectedTabIndex = index }, - modifier = Modifier.clickable { selectedTabIndex = index }, + onClick = { + selectedTabIndex = index + selectedIds = emptySet() + }, text = { Text( text = category, diff --git a/app/src/main/java/com/hinnka/mycamera/viewmodel/CameraViewModel.kt b/app/src/main/java/com/hinnka/mycamera/viewmodel/CameraViewModel.kt index ef816f55..2fc769f6 100644 --- a/app/src/main/java/com/hinnka/mycamera/viewmodel/CameraViewModel.kt +++ b/app/src/main/java/com/hinnka/mycamera/viewmodel/CameraViewModel.kt @@ -122,9 +122,8 @@ class CameraViewModel(application: Application) : AndroidViewModel(application) val showLevelIndicator: Flow = userPreferencesRepository.userPreferences.map { it.showLevelIndicator } val shutterSoundEnabled: Flow = userPreferencesRepository.userPreferences.map { it.shutterSoundEnabled } val vibrationEnabled: Flow = userPreferencesRepository.userPreferences.map { it.vibrationEnabled } - val volumeKeyAction: StateFlow = userPreferencesRepository.userPreferences - .map { it.volumeKeyAction } - .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), VolumeKeyAction.CAPTURE) + val volumeKeyAction: StateFlow = userPreferencesRepository.userPreferences.map { it.volumeKeyAction } + .stateIn(viewModelScope, SharingStarted.Eagerly, initialValue = VolumeKeyAction.NONE) val autoSaveAfterCapture: Flow = userPreferencesRepository.userPreferences.map { it.autoSaveAfterCapture } val nrLevel: StateFlow = userPreferencesRepository.userPreferences .map { it.nrLevel } @@ -145,15 +144,9 @@ class CameraViewModel(application: Application) : AndroidViewModel(application) .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), 8) // 软件处理参数 Flow - val sharpening: StateFlow = userPreferencesRepository.userPreferences - .map { it.sharpening } - .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), 0f) - val noiseReduction: StateFlow = userPreferencesRepository.userPreferences - .map { it.noiseReduction } - .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), 0f) - val chromaNoiseReduction: StateFlow = userPreferencesRepository.userPreferences - .map { it.chromaNoiseReduction } - .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), 0f) + val sharpening: Flow = userPreferencesRepository.userPreferences.map { it.sharpening } + val noiseReduction: Flow = userPreferencesRepository.userPreferences.map { it.noiseReduction } + val chromaNoiseReduction: Flow = userPreferencesRepository.userPreferences.map { it.chromaNoiseReduction } private var isShutterSoundEnabled = true private var isVibrationEnabled = true @@ -1210,9 +1203,9 @@ class CameraViewModel(application: Application) : AndroidViewModel(application) val aspectRatio = state.value.aspectRatio val frameIdToSave = currentFrameId val shouldAutoSave = autoSaveAfterCapture.firstOrNull() ?: false - val sharpeningValue = sharpening.value - val noiseReductionValue = noiseReduction.value - val chromaNoiseReductionValue = chromaNoiseReduction.value + val sharpeningValue = sharpening.firstOrNull() ?: 0f + val noiseReductionValue = noiseReduction.firstOrNull() ?: 0f + val chromaNoiseReductionValue = chromaNoiseReduction.firstOrNull() ?: 0f val currentCameraId = cameraController.getCurrentCameraId() // 计算旋转角度 @@ -1264,9 +1257,9 @@ class CameraViewModel(application: Application) : AndroidViewModel(application) captureResult, shouldAutoSave, photoProcessor, - sharpening.value, - noiseReduction.value, - chromaNoiseReduction.value, + sharpeningValue, + noiseReductionValue, + chromaNoiseReductionValue, onProcessingComplete = { cameraController.releaseImage(image) } ) } @@ -1295,9 +1288,9 @@ class CameraViewModel(application: Application) : AndroidViewModel(application) val aspectRatio = state.value.aspectRatio val frameIdToSave = currentFrameId val shouldAutoSave = autoSaveAfterCapture.firstOrNull() ?: false - val sharpeningValue = sharpening.value - val noiseReductionValue = noiseReduction.value - val chromaNoiseReductionValue = chromaNoiseReduction.value + val sharpeningValue = sharpening.firstOrNull() ?: 0f + val noiseReductionValue = noiseReduction.firstOrNull() ?: 0f + val chromaNoiseReductionValue = chromaNoiseReduction.firstOrNull() ?: 0f val currentCameraId = cameraController.getCurrentCameraId() // 计算旋转角度 @@ -1347,9 +1340,9 @@ class CameraViewModel(application: Application) : AndroidViewModel(application) aspectRatio, shouldAutoSave, photoProcessor, - sharpening.value, - noiseReduction.value, - chromaNoiseReduction.value, + sharpeningValue, + noiseReductionValue, + chromaNoiseReductionValue, onProcessingComplete = { images.forEach { cameraController.releaseImage(it) } } ) } diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index a046e7c1..036fa7df 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -85,7 +85,7 @@ 成功导入 %d 个项目 导入失败: %d 个项目 分类排序 - 按住右侧手柄拖动排序 + 按住左侧手柄拖动排序 多帧合成 拍摄多张照片并合成,以获得更好的画质和更低的噪点。 多帧合成帧数 diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 8413fcf2..569288fc 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -198,9 +198,9 @@ 基础 - 色彩 - 光影 - 质感 + 颜色 + 亮度 + 效果 细节