refactor: remove AI mode from LUT creator

This commit is contained in:
zhoubinjia committed 2026-11-10 14:49:13 +08:00
1 parent 2640bade33
commit ce87142df3
12 files changed
+195 -590

No files matched your search

@@ -1,40 +0,0 @@
package com.hinnka.mycamera.lut.creator
import android.graphics.Bitmap
import androidx.core.graphics.scale
object AiImagePreprocessor {
private const val VISION_MAX_EDGE = 1024
private const val IMAGE_EDIT_MAX_EDGE = 1024
fun prepareForVisionAnalysis(bitmap: Bitmap): Bitmap {
if (bitmap.width <= VISION_MAX_EDGE && bitmap.height <= VISION_MAX_EDGE) {
return bitmap
}
val scale = VISION_MAX_EDGE.toFloat() / maxOf(bitmap.width, bitmap.height)
val width = (bitmap.width * scale).toInt().coerceAtLeast(1)
val height = (bitmap.height * scale).toInt().coerceAtLeast(1)
return bitmap.scale(width, height)
}
fun prepareForImageToImage(bitmap: Bitmap): Bitmap {
val squareBitmap = cropBitmapToSquare(bitmap)
if (squareBitmap.width <= IMAGE_EDIT_MAX_EDGE && squareBitmap.height <= IMAGE_EDIT_MAX_EDGE) {
return squareBitmap
}
return squareBitmap.scale(IMAGE_EDIT_MAX_EDGE, IMAGE_EDIT_MAX_EDGE)
}
private fun cropBitmapToSquare(bitmap: Bitmap): Bitmap {
if (bitmap.width == bitmap.height) {
return bitmap
}
val size = minOf(bitmap.width, bitmap.height)
val x = (bitmap.width - size) / 2
val y = (bitmap.height - size) / 2
return Bitmap.createBitmap(bitmap, x, y, size, size)
}
}
@@ -1,8 +1,5 @@
package com.hinnka.mycamera.lut.creator
import android.app.Activity
import android.content.Context
import android.content.ContextWrapper
import android.net.Uri
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
@@ -22,10 +19,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.platform.LocalContext
import com.hinnka.mycamera.R
import com.hinnka.mycamera.ui.components.PaymentDialog
import com.hinnka.mycamera.ui.icons.AppIcons
private data class LocalImagePairDraft(
@@ -33,11 +27,6 @@ private data class LocalImagePairDraft(
val targetUri: Uri
)
private enum class LutCreatorMode {
AI,
LOCAL
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun LutCreatorScreen(
@@ -46,28 +35,11 @@ fun LutCreatorScreen(
onSuccess: (String) -> Unit
) {
val uiState by viewModel.uiState.collectAsState()
val context = LocalContext.current
val isPurchased by viewModel.isPurchased.collectAsState()
val openAIKey by viewModel.openAIApiKey.collectAsState()
val canUseLutCreator = isPurchased || !openAIKey.isNullOrBlank()
var lutName by remember { mutableStateOf("My AI LUT") }
var customPrompt by remember { mutableStateOf("") }
var selectedMode by remember { mutableStateOf(LutCreatorMode.AI) }
var lutName by remember { mutableStateOf("My LUT") }
var pendingSourceUri by remember { mutableStateOf<Uri?>(null) }
var localPairs by remember { mutableStateOf(listOf<LocalImagePairDraft>()) }
val idleScrollState = rememberScrollState()
val aiImageLauncher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.GetContent()
) { uri: Uri? ->
uri ?: return@rememberLauncherForActivityResult
if (!canUseLutCreator) {
viewModel.showPaymentDialog = true
return@rememberLauncherForActivityResult
}
viewModel.analyzeAiImage(uri, customPrompt)
}
val localSourceLauncher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.GetContent()
) { uri: Uri? ->
@@ -114,194 +86,130 @@ fun LutCreatorScreen(
verticalArrangement = Arrangement.Top,
horizontalAlignment = Alignment.Start
) {
if (!canUseLutCreator) {
LutCreatorPremiumRequiredCard(
onPurchase = { viewModel.showPaymentDialog = true }
)
Spacer(modifier = Modifier.height(24.dp))
return@Column
}
PrimaryTabRow(
selectedTabIndex = selectedMode.ordinal,
containerColor = Color.Transparent,
contentColor = Color(0xFFE5A324)
) {
Tab(
selected = selectedMode == LutCreatorMode.AI,
onClick = { selectedMode = LutCreatorMode.AI },
text = { Text(stringResource(R.string.lut_creator_tab_ai)) }
)
Tab(
selected = selectedMode == LutCreatorMode.LOCAL,
onClick = { selectedMode = LutCreatorMode.LOCAL },
text = { Text(stringResource(R.string.lut_creator_tab_local)) }
)
}
Spacer(modifier = Modifier.height(16.dp))
Surface(
color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.4f),
shape = RoundedCornerShape(20.dp),
modifier = Modifier.fillMaxWidth()
) {
Column(modifier = Modifier.padding(20.dp)) {
when (selectedMode) {
LutCreatorMode.AI -> {
val isSelectingTarget = pendingSourceUri != null
Text(
text = stringResource(R.string.lut_creator_tab_local),
style = MaterialTheme.typography.titleMedium,
fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold
)
Spacer(modifier = Modifier.height(6.dp))
Text(
text = stringResource(R.string.lut_creator_local_mode_desc),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(16.dp))
HorizontalDivider(color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.1f))
Spacer(modifier = Modifier.height(16.dp))
Text(
text = stringResource(R.string.lut_creator_local_pairs_hint),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(16.dp))
Surface(
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(14.dp),
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.55f)
) {
Column(modifier = Modifier.padding(14.dp)) {
Text(
text = stringResource(R.string.lut_creator_tab_ai),
style = MaterialTheme.typography.titleMedium,
text = if (isSelectingTarget) {
stringResource(R.string.lut_creator_local_step_select_target)
} else {
stringResource(R.string.lut_creator_local_step_select_source)
},
style = MaterialTheme.typography.titleSmall,
fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold
)
Spacer(modifier = Modifier.height(6.dp))
Spacer(modifier = Modifier.height(4.dp))
Text(
text = stringResource(R.string.lut_creator_ai_mode_desc),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(16.dp))
OutlinedTextField(
value = customPrompt,
onValueChange = { customPrompt = it },
label = { Text(stringResource(R.string.lut_creator_custom_ai_instructions)) },
placeholder = { Text(stringResource(R.string.lut_creator_custom_ai_hint)) },
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp),
colors = OutlinedTextFieldDefaults.colors(
unfocusedBorderColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.2f),
focusedBorderColor = Color(0xFFE5A324)
)
)
Spacer(modifier = Modifier.height(12.dp))
Text(
text = stringResource(R.string.lut_creator_use_ai),
text = if (isSelectingTarget) {
stringResource(R.string.lut_creator_local_step_select_target_desc)
} else {
stringResource(R.string.lut_creator_local_step_select_source_desc)
},
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
LutCreatorMode.LOCAL -> {
val isSelectingTarget = pendingSourceUri != null
Text(
text = stringResource(R.string.lut_creator_tab_local),
style = MaterialTheme.typography.titleMedium,
fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold
)
Spacer(modifier = Modifier.height(6.dp))
Text(
text = stringResource(R.string.lut_creator_local_mode_desc),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(16.dp))
HorizontalDivider(color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.1f))
Spacer(modifier = Modifier.height(16.dp))
Text(
text = stringResource(R.string.lut_creator_local_pairs_hint),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(16.dp))
Surface(
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(14.dp),
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.55f)
) {
Column(modifier = Modifier.padding(14.dp)) {
Text(
text = if (isSelectingTarget) {
stringResource(R.string.lut_creator_local_step_select_target)
} else {
stringResource(R.string.lut_creator_local_step_select_source)
},
style = MaterialTheme.typography.titleSmall,
fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold
)
Spacer(modifier = Modifier.height(4.dp))
Text(
text = if (isSelectingTarget) {
stringResource(R.string.lut_creator_local_step_select_target_desc)
} else {
stringResource(R.string.lut_creator_local_step_select_source_desc)
},
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
Spacer(modifier = Modifier.height(14.dp))
Button(
onClick = {
if (isSelectingTarget) {
localTargetLauncher.launch("image/*")
} else {
localSourceLauncher.launch("image/*")
}
Spacer(modifier = Modifier.height(14.dp))
Button(
onClick = {
if (isSelectingTarget) {
localTargetLauncher.launch("image/*")
} else {
localSourceLauncher.launch("image/*")
}
},
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp)
) {
},
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp)
) {
Text(
if (isSelectingTarget) {
stringResource(R.string.lut_creator_select_effect_image)
} else {
stringResource(R.string.lut_creator_select_source_image)
}
)
}
Spacer(modifier = Modifier.height(12.dp))
OutlinedButton(
onClick = {
pendingSourceUri = null
localPairs = emptyList()
},
enabled = isSelectingTarget || localPairs.isNotEmpty(),
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp)
) {
Text(stringResource(R.string.lut_creator_reset_local_selection))
}
Spacer(modifier = Modifier.height(16.dp))
Surface(
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(14.dp),
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.55f)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 14.dp, vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
imageVector = Icons.Default.CheckCircle,
contentDescription = null,
tint = Color(0xFFE5A324),
modifier = Modifier.size(20.dp)
)
Spacer(modifier = Modifier.width(10.dp))
Column(modifier = Modifier.weight(1f)) {
Text(
if (isSelectingTarget) {
stringResource(R.string.lut_creator_select_effect_image)
text = stringResource(
R.string.lut_creator_local_pairs_count,
localPairs.size
),
style = MaterialTheme.typography.titleSmall
)
Spacer(modifier = Modifier.height(2.dp))
Text(
text = if (isSelectingTarget) {
stringResource(R.string.lut_creator_local_pending_target)
} else {
stringResource(R.string.lut_creator_select_source_image)
}
stringResource(R.string.lut_creator_local_ready_status)
},
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
Spacer(modifier = Modifier.height(12.dp))
OutlinedButton(
onClick = {
pendingSourceUri = null
localPairs = emptyList()
},
enabled = isSelectingTarget || localPairs.isNotEmpty(),
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp)
) {
Text(stringResource(R.string.lut_creator_reset_local_selection))
}
Spacer(modifier = Modifier.height(16.dp))
Surface(
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(14.dp),
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.55f)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 14.dp, vertical = 12.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(
imageVector = Icons.Default.CheckCircle,
contentDescription = null,
tint = Color(0xFFE5A324),
modifier = Modifier.size(20.dp)
)
Spacer(modifier = Modifier.width(10.dp))
Column(modifier = Modifier.weight(1f)) {
Text(
text = stringResource(
R.string.lut_creator_local_pairs_count,
localPairs.size
),
style = MaterialTheme.typography.titleSmall
)
Spacer(modifier = Modifier.height(2.dp))
Text(
text = if (isSelectingTarget) {
stringResource(R.string.lut_creator_local_pending_target)
} else {
stringResource(R.string.lut_creator_local_ready_status)
},
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}
}
}
@@ -310,19 +218,11 @@ fun LutCreatorScreen(
Spacer(modifier = Modifier.height(20.dp))
Button(
onClick = {
if (!canUseLutCreator) {
viewModel.showPaymentDialog = true
return@Button
}
if (selectedMode == LutCreatorMode.AI) {
aiImageLauncher.launch("image/*")
} else {
viewModel.analyzeLocalImagePairs(
localPairs.map { LocalImagePairInput(it.sourceUri, it.targetUri) }
)
}
viewModel.analyzeLocalImagePairs(
localPairs.map { LocalImagePairInput(it.sourceUri, it.targetUri) }
)
},
enabled = selectedMode == LutCreatorMode.AI || localPairs.isNotEmpty(),
enabled = localPairs.isNotEmpty(),
modifier = Modifier
.fillMaxWidth()
.height(60.dp),
@@ -333,11 +233,7 @@ fun LutCreatorScreen(
)
) {
Text(
if (selectedMode == LutCreatorMode.AI) {
stringResource(R.string.lut_creator_select_images)
} else {
stringResource(R.string.lut_creator_start_local_analysis)
},
stringResource(R.string.lut_creator_start_local_analysis),
style = MaterialTheme.typography.titleLarge,
fontWeight = androidx.compose.ui.text.font.FontWeight.Medium
)
@@ -385,28 +281,6 @@ fun LutCreatorScreen(
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
)
state.generatedSourceBitmap?.let { bitmap ->
Spacer(modifier = Modifier.height(24.dp))
Text(
text = stringResource(R.string.lut_creator_ai_restored_preview),
style = MaterialTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(12.dp))
Surface(
shape = RoundedCornerShape(16.dp),
shadowElevation = 4.dp,
modifier = Modifier.sizeIn(maxHeight = 300.dp)
) {
androidx.compose.foundation.Image(
bitmap = bitmap.asImageBitmap(),
contentDescription = "AI Generated Original",
modifier = Modifier.fillMaxWidth(),
contentScale = androidx.compose.ui.layout.ContentScale.Fit
)
}
}
Spacer(modifier = Modifier.height(32.dp))
OutlinedTextField(
value = lutName,
@@ -512,71 +386,4 @@ fun LutCreatorScreen(
}
}
}
if (viewModel.showPaymentDialog) {
val activity = context.findActivity()
PaymentDialog(
onDismiss = { viewModel.showPaymentDialog = false },
onPurchase = {
if (activity != null) {
viewModel.purchase(activity)
}
viewModel.showPaymentDialog = false
}
)
}
}
@Composable
private fun LutCreatorPremiumRequiredCard(
onPurchase: () -> Unit
) {
Surface(
color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.4f),
shape = RoundedCornerShape(20.dp),
modifier = Modifier
.fillMaxWidth()
.padding(top = 16.dp)
) {
Column(
modifier = Modifier.padding(20.dp),
horizontalAlignment = Alignment.Start
) {
Text(
text = stringResource(R.string.lut_creator_premium_required_title),
style = MaterialTheme.typography.titleMedium,
fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold
)
Spacer(modifier = Modifier.height(8.dp))
Text(
text = stringResource(R.string.lut_creator_premium_required_desc),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
Spacer(modifier = Modifier.height(20.dp))
Button(
onClick = onPurchase,
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp),
colors = ButtonDefaults.buttonColors(
containerColor = Color(0xFFE5A324),
contentColor = Color.White
)
) {
Text(
text = stringResource(R.string.billing_premium_get_access),
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
)
}
}
}
}
private fun Context.findActivity(): Activity? {
var current = this
while (current is ContextWrapper) {
if (current is Activity) return current
current = current.baseContext
}
return null
}
@@ -3,119 +3,25 @@ package com.hinnka.mycamera.lut.creator
import android.app.Application
import android.graphics.BitmapFactory
import android.net.Uri
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.viewModelScope
import com.hinnka.mycamera.data.CustomImportManager
import com.hinnka.mycamera.data.ContentRepository
import com.hinnka.mycamera.lut.LutManager
import com.hinnka.mycamera.utils.PLog
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import java.io.File
class LutCreatorViewModel(application: Application) : AndroidViewModel(application) {
private val contentRepository = ContentRepository.getInstance(application)
private val userPreferencesRepository = contentRepository.userPreferencesRepository
private val billingManager = com.hinnka.mycamera.billing.BillingManagerImpl(application)
private val importManager = CustomImportManager(application)
private val lutManager = LutManager(application)
private val _uiState = MutableStateFlow<LutCreatorUiState>(LutCreatorUiState.Idle)
val uiState: StateFlow<LutCreatorUiState> = _uiState
val aiAnalysisEnabled: MutableStateFlow<Boolean> = MutableStateFlow(false)
val isPurchased = billingManager.isPurchased
val openAIApiKey = userPreferencesRepository.userPreferences.map { it.openAIApiKey }
.stateIn(viewModelScope, SharingStarted.Eagerly, "")
var showPaymentDialog by mutableStateOf(false)
fun purchase(activity: android.app.Activity) {
billingManager.purchase(activity)
}
fun analyzeAiImage(uri: Uri, customPrompt: String = "") {
viewModelScope.launch(Dispatchers.IO) {
_uiState.value = LutCreatorUiState.Analyzing
try {
val bitmap = loadBitmapFromUri(uri)
if (bitmap == null) {
_uiState.value = LutCreatorUiState.Error("Failed to decode image(s)")
return@launch
}
val context = getApplication<Application>()
val client = OpenAIApiClient()
client.initialize(context)
val preparedBitmap = AiImagePreprocessor.prepareForVisionAnalysis(bitmap)
PLog.d(
"LutCreatorViewModel",
"Calling AI text recipe generation for single-image LUT creation..."
)
val recipe = client.generateLutRecipeFromImage(
bitmap = preparedBitmap,
customPrompt = customPrompt
).getOrThrow()
PLog.d("LutCreatorViewModel", "AI text recipe: $recipe")
_uiState.value = LutCreatorUiState.AnalysisComplete(recipe)
} catch (e: Exception) {
_uiState.value = LutCreatorUiState.Error("Analysis failed: ${e.message}")
}
}
}
fun analyzeAiImageWithImageEdit(uri: Uri, customPrompt: String = "") {
viewModelScope.launch(Dispatchers.IO) {
_uiState.value = LutCreatorUiState.Analyzing
try {
val bitmap = loadBitmapFromUri(uri)
if (bitmap == null) {
_uiState.value = LutCreatorUiState.Error("Failed to decode image(s)")
return@launch
}
val context = getApplication<Application>()
val client = OpenAIApiClient()
client.initialize(context)
PLog.d(
"LutCreatorViewModel",
"Calling Gemini 3.1 for direct image-to-image restoration..."
)
val preparedBitmap = AiImagePreprocessor.prepareForImageToImage(bitmap)
val sourceBitmap = client.generateOriginalImage(
bitmap = preparedBitmap,
model = OpenAIApiClient.BUILT_IN_IMAGE_MODEL,
customPrompt = customPrompt
).getOrThrow()
PLog.d("LutCreatorViewModel", "AI generated original image, analyzing pair locally...")
val recipe = LocalImageAnalyzer.analyzeSourceTargetImages(sourceBitmap, preparedBitmap)
PLog.d("LutCreatorViewModel", "Recipe: $recipe")
_uiState.value = LutCreatorUiState.AnalysisComplete(recipe, sourceBitmap)
} catch (e: Exception) {
_uiState.value = LutCreatorUiState.Error("Analysis failed: ${e.message}")
}
}
}
fun analyzeLocalImagePairs(pairs: List<LocalImagePairInput>) {
viewModelScope.launch(Dispatchers.IO) {
_uiState.value = LutCreatorUiState.Analyzing
@@ -215,10 +121,7 @@ data class LocalImagePairInput(
sealed class LutCreatorUiState {
object Idle : LutCreatorUiState()
object Analyzing : LutCreatorUiState()
data class AnalysisComplete(
val recipe: LutRecipe,
val generatedSourceBitmap: android.graphics.Bitmap? = null
) : LutCreatorUiState()
data class AnalysisComplete(val recipe: LutRecipe) : LutCreatorUiState()
object Generating : LutCreatorUiState()
data class Success(val lutId: String) : LutCreatorUiState()
data class Error(val message: String) : LutCreatorUiState()
@@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Switch
@@ -22,7 +21,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.scale
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
import androidx.compose.ui.input.pointer.pointerInput
@@ -75,23 +73,45 @@ fun ApertureScaleSettingItem(
.fillMaxWidth()
.padding(vertical = 8.dp)
) {
// 与 SwitchSettingItem 保持一致的头部:左侧标题 + 描述,右侧开关
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = title,
color = if (enabled) Color.White else Color.White.copy(alpha = 0.45f),
fontSize = 16.sp,
fontWeight = FontWeight.Normal
)
Column(modifier = Modifier.weight(1f)) {
Row(verticalAlignment = Alignment.CenterVertically) {
Text(
text = title,
color = Color.White,
fontSize = 16.sp,
fontWeight = FontWeight.Normal
)
if (shouldShowScale) {
Spacer(modifier = Modifier.width(8.dp))
Text(
text = "f/${formatApertureStop(ApertureScaleStops[selectedIndex])}",
color = AccentColor,
fontSize = 14.sp,
fontWeight = FontWeight.Medium
)
}
}
description?.let {
Spacer(modifier = Modifier.height(2.dp))
Text(
text = it,
color = Color.White.copy(alpha = 0.6f),
fontSize = 13.sp,
lineHeight = 18.sp
)
}
}
if (toggleValue != null) {
Spacer(modifier = Modifier.width(8.dp))
Switch(
checked = toggleValue,
onCheckedChange = onToggleChange,
modifier = Modifier.scale(0.7f).size(40.dp, 24.dp),
colors = SwitchDefaults.colors(
checkedThumbColor = OnAccentColor,
checkedTrackColor = AccentColor,
@@ -101,27 +121,6 @@ fun ApertureScaleSettingItem(
)
)
}
Spacer(modifier = Modifier.weight(1f))
if (shouldShowScale) {
Text(
text = "f/${formatApertureStop(ApertureScaleStops[selectedIndex])}",
color = Color.White.copy(alpha = if (enabled) 0.8f else 0.35f),
fontSize = 14.sp,
fontWeight = FontWeight.Medium
)
}
}
description?.let {
Spacer(modifier = Modifier.height(4.dp))
Text(
text = it,
color = Color.White.copy(alpha = if (enabled) 0.6f else 0.35f),
fontSize = 13.sp,
lineHeight = 18.sp
)
}
if (shouldShowScale) {
+7 -15
View File
@@ -1015,19 +1015,12 @@
<string name="settings_widget_theme_dark">深色</string>
<!-- LUT Creator & UI -->
<string name="lut_creator_title">AI 仿色</string>
<string name="lut_creator_desc">選擇圖片分析色彩風格,并生成專屬 LUT。</string>
<string name="lut_creator_premium_required_title">需要會員</string>
<string name="lut_creator_premium_required_desc">未在設定中配置自己的 OpenAI API Key 時,LUT 創建功能需要購買會員后才能使用。</string>
<string name="lut_creator_tab_ai">AI 分析</string>
<string name="lut_creator_tab_local">本地分析</string>
<string name="lut_creator_use_ai">AI 會根據所選效果圖生成文字版 LUT 配方。</string>
<string name="lut_creator_custom_ai_instructions">自訂 AI 提示詞(選填)</string>
<string name="lut_creator_custom_ai_hint">例如:讓畫面更有氛圍感,加深對比度</string>
<string name="lut_creator_title">仿色</string>
<string name="lut_creator_desc">用原圖和效果圖配對,複刻色彩風格並生成專屬 LUT。</string>
<string name="lut_creator_tab_local">原圖 / 效果圖配對</string>
<string name="lut_creator_select_images">選擇圖片</string>
<string name="lut_creator_ai_mode_desc">上傳一張效果圖,AI 會直接推斷文字版 LUT 配方,不再調用圖片編輯能力。</string>
<string name="lut_creator_local_mode_desc">上傳多組圖片,每組包含一張原圖和一張效果圖,且應盡量是完全相同的場景。</string>
<string name="lut_creator_local_pairs_hint">本地分析支援多組原圖/效果圖配對。構圖、曝光和場景越一致,合并后的控制點越穩定。</string>
<string name="lut_creator_local_mode_desc">添加一組或多組圖片,每組包含同一場景的一張原圖和一張調色後的效果圖。</string>
<string name="lut_creator_local_pairs_hint">配對越多,構圖和曝光越一致,生成的 LUT 越準確。</string>
<string name="lut_creator_select_source_image">選擇原圖</string>
<string name="lut_creator_select_effect_image">選擇效果圖</string>
<string name="lut_creator_reset_local_selection">清空已選內容</string>
@@ -1038,10 +1031,9 @@
<string name="lut_creator_local_pairs_count">已添加 %1$d 組圖片</string>
<string name="lut_creator_local_pending_target">當前有 1 組還差效果圖</string>
<string name="lut_creator_local_ready_status">可以繼續添加圖片組,或直接開始分析</string>
<string name="lut_creator_start_local_analysis">開始本地分析</string>
<string name="lut_creator_start_local_analysis">開始分析</string>
<string name="lut_creator_analyzing">正在分析圖片風格…</string>
<string name="lut_creator_analysis_complete">分析完成!</string>
<string name="lut_creator_ai_restored_preview">AI 還原的原圖預覽</string>
<string name="lut_creator_lut_name_hint">LUT 預設名稱</string>
<string name="lut_creator_generate_save">生成并儲存</string>
<string name="lut_creator_generating">正在生成 3D LUT 資料…</string>
@@ -1092,7 +1084,7 @@
<string name="settings_default_virtual_aperture_description">開啟后,拍攝及匯入相片將自動應用所選光圈值的虛化效果。</string>
<string name="virtual_aperture_depth_model_description">使用目前已安裝的相容深度模型。首次使用時可下載預設模型,或匯入其他相容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_title">大光圈虛化</string>
<string name="gallery_large_aperture_blur_description">使用目前已安裝的相容深度模型估計畫面深度,模擬大光圈的淺景深、背景虛化和柔和散景光斑。輕點畫面可改變對焦位置;光圈值越小,虛化越強。首次使用時可下載預設模型,或匯入其他相容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_description">模擬大光圈的淺景深背景虛化效果</string>
<string name="gallery_bokeh_style_title">光斑風格</string>
<string name="gallery_bokeh_processing">虛化處理中…</string>
<string name="gallery_denoise_processing">降噪處理中…</string>
+6 -14
View File
@@ -1225,18 +1225,11 @@
<string name="settings_widget_theme_light">Clair</string>
<string name="settings_widget_theme_dark">Sombre</string>
<string name="lut_creator_title">Créateur de LUT</string>
<string name="lut_creator_desc">Sélectionnez des images pour analyser le style et générer un LUT personnalisé.</string>
<string name="lut_creator_premium_required_title">Premium requis</string>
<string name="lut_creator_premium_required_desc">Le Créateur de LUT nécessite Premium, sauf si vous avez configuré votre propre clé API OpenAI dans les Paramètres.</string>
<string name="lut_creator_tab_ai">Analyse IA</string>
<string name="lut_creator_tab_local">Analyse locale</string>
<string name="lut_creator_use_ai">L\'IA générera une recette de LUT sous forme de texte à partir de l\'image stylisée sélectionnée.</string>
<string name="lut_creator_custom_ai_instructions">Instructions IA personnalisées (facultatif)</string>
<string name="lut_creator_custom_ai_hint">ex. plus sombre, accentuer les rouges</string>
<string name="lut_creator_desc">Associez des originaux à des images stylisées pour reproduire un style colorimétrique dans un LUT personnalisé.</string>
<string name="lut_creator_tab_local">Paires original / stylisée</string>
<string name="lut_creator_select_images">Sélectionner des images</string>
<string name="lut_creator_ai_mode_desc">Importez une image stylisée. L\'IA déduira directement une recette de LUT sous forme de texte, sans retouche d\'image.</string>
<string name="lut_creator_local_mode_desc">Importez plusieurs paires d\'images. Chaque paire doit comprendre une image originale et une image stylisée de la même scène.</string>
<string name="lut_creator_local_pairs_hint">Pour l\'analyse locale, ajoutez plusieurs paires original/stylisée. Plus le cadrage et l\'exposition se ressemblent, meilleurs seront les points de contrôle fusionnés.</string>
<string name="lut_creator_local_mode_desc">Ajoutez une ou plusieurs paires d\'images. Chaque paire comprend un original et une version étalonnée de la même scène.</string>
<string name="lut_creator_local_pairs_hint">Plus les paires sont nombreuses et proches en cadrage et en exposition, plus le LUT sera précis.</string>
<string name="lut_creator_select_source_image">Sélectionner l\'image originale</string>
<string name="lut_creator_select_effect_image">Sélectionner l\'image stylisée</string>
<string name="lut_creator_reset_local_selection">Effacer la sélection</string>
@@ -1247,10 +1240,9 @@
<string name="lut_creator_local_pairs_count">%1$d paire(s) d\'images ajoutée(s)</string>
<string name="lut_creator_local_pending_target">1 paire attend encore son image stylisée</string>
<string name="lut_creator_local_ready_status">Vous pouvez ajouter d\'autres paires ou lancer l\'analyse maintenant</string>
<string name="lut_creator_start_local_analysis">Analyser les paires locales</string>
<string name="lut_creator_start_local_analysis">Lancer l\'analyse</string>
<string name="lut_creator_analyzing">Analyse du style de l\'image…</string>
<string name="lut_creator_analysis_complete">Analyse terminée !</string>
<string name="lut_creator_ai_restored_preview">Aperçu d\'origine restauré par l\'IA</string>
<string name="lut_creator_lut_name_hint">Nom du LUT</string>
<string name="lut_creator_generate_save">Générer et enregistrer</string>
<string name="lut_creator_generating">Génération du LUT 3D interpolé…</string>
@@ -1275,7 +1267,7 @@
<string name="settings_default_virtual_aperture_description">Active automatiquement l\'ouverture virtuelle avec la valeur d\'ouverture choisie pour les nouvelles photos.</string>
<string name="virtual_aperture_depth_model_description">Utilise le modèle de profondeur compatible installé. Téléchargez le modèle par défaut ou importez un autre modèle TFLite compatible lors de la première utilisation.</string>
<string name="gallery_large_aperture_blur_title">Flou à grande ouverture</string>
<string name="gallery_large_aperture_blur_description">Utilise le modèle de profondeur compatible installé pour estimer la profondeur de la scène et simuler une faible profondeur de champ, un flou d\'arrière-plan et des bokehs doux. Touchez l\'image pour changer le point de mise au point. Plus le nombre f est bas, plus le flou est marqué. Téléchargez le modèle par défaut ou importez un autre modèle TFLite compatible lors de la première utilisation.</string>
<string name="gallery_large_aperture_blur_description">Simule la faible profondeur de champ et le flou d\'arrière-plan d\'une grande ouverture</string>
<string name="gallery_bokeh_style_title">Style de bokeh</string>
<string name="gallery_bokeh_style_default">Tourbillon</string>
<string name="gallery_bokeh_style_natural">Naturel</string>
+6 -14
View File
@@ -884,18 +884,11 @@
<string name="settings_widget_theme_light">ライト</string>
<string name="settings_widget_theme_dark">ダーク</string>
<string name="lut_creator_title">LUTクリエイター</string>
<string name="lut_creator_desc">画像のスタイルを解析し、カスタムLUTを生成</string>
<string name="lut_creator_premium_required_title">Premiumが必要です</string>
<string name="lut_creator_premium_required_desc">設定で独自のOpenAI APIキーを指定していない場合、LUT CreatorにはPremiumが必要です。</string>
<string name="lut_creator_tab_ai">AI解析</string>
<string name="lut_creator_tab_local">ローカル解析</string>
<string name="lut_creator_use_ai">AIが選択したスタイル画像からテキスト形式のLUTレシピを生成します。</string>
<string name="lut_creator_custom_ai_instructions">カスタムAI指示(任意)</string>
<string name="lut_creator_custom_ai_hint">例:もっとムーディーに、赤を強調</string>
<string name="lut_creator_desc">オリジナルと仕上がり画像のペアから色調を再現し、カスタムLUTを生成</string>
<string name="lut_creator_tab_local">オリジナル/仕上がりペア</string>
<string name="lut_creator_select_images">画像を選択</string>
<string name="lut_creator_ai_mode_desc">スタイル適用済み画像を1枚アップロードします。画像編集は行わず、AIが直接テキストLUTレシピを推定します。</string>
<string name="lut_creator_local_mode_desc">複数の画像ペアをアップロードします。各ペアには同一シーンのオリジナル画像とスタイル適用済み画像を含めてください。</string>
<string name="lut_creator_local_pairs_hint">ローカル解析では複数のオリジナル/スタイル済みペアを追加します。構図と露出が近いほど、統合されるコントロールポイントの精度が上がります。</string>
<string name="lut_creator_local_mode_desc">1組以上の画像ペアを追加します。各ペアは同じシーンのオリジナル画像とカラーグレーディング済み画像です。</string>
<string name="lut_creator_local_pairs_hint">ペアが多く、構図と露出が近いほど、より正確なLUTが生成されます。</string>
<string name="lut_creator_select_source_image">オリジナル画像を選択</string>
<string name="lut_creator_select_effect_image">スタイル画像を選択</string>
<string name="lut_creator_reset_local_selection">選択を解除</string>
@@ -906,10 +899,9 @@
<string name="lut_creator_local_pairs_count">%1$d 組の画像ペアを追加</string>
<string name="lut_creator_local_pending_target">1組がスタイル画像持ちです</string>
<string name="lut_creator_local_ready_status">さらにペアを追加するか、このまま解析を開始できます</string>
<string name="lut_creator_start_local_analysis">ローカルペアを解析</string>
<string name="lut_creator_start_local_analysis">解析を開始</string>
<string name="lut_creator_analyzing">画像スタイルを解析中...</string>
<string name="lut_creator_analysis_complete">解析完了</string>
<string name="lut_creator_ai_restored_preview">AIがオリジナルプレビューを復元しました</string>
<string name="lut_creator_lut_name_hint">LUT名</string>
<string name="lut_creator_generate_save">生成して保存</string>
@@ -943,7 +935,7 @@
<string name="settings_default_virtual_aperture_description">新しい写真で、選択したF値の仮想絞りを自動有効化</string>
<string name="virtual_aperture_depth_model_description">インストール済みの対応深度モデルを使用します。初回使用時に既定モデルをダウンロードするか、別の対応TFLiteモデルを読み込んでください。</string>
<string name="gallery_large_aperture_blur_title">大口径ボケ</string>
<string name="gallery_large_aperture_blur_description">対応深度モデルでシーン深度を推定し、浅い被写界深度、背景ボケ、柔らかな玉ボケをシミュレートします。画像をタップして合焦点を変更できます。F値が小さいほどボケは強くなります。初回使用時に既定モデルをダウンロードするか、別の対応TFLiteモデルを読み込んでください。</string>
<string name="gallery_large_aperture_blur_description">大口径レンズの浅い被写界深度と背景ボケを再現します</string>
<string name="gallery_bokeh_style_title">ボケ味</string>
<string name="gallery_bokeh_processing">ボケ処理中…</string>
<string name="gallery_denoise_processing">ノイズ低減を処理中…</string>
+6 -14
View File
@@ -741,19 +741,12 @@
<string name="settings_widget_theme_dark">มืด</string>
<!-- LUT Creator & UI -->
<string name="lut_creator_title">AI กำลังทำสี</string>
<string name="lut_creator_desc">เลือกสไตล์สีการวิเคราะห์ภาพและสร้าง LUT ของคุณเอง</string>
<string name="lut_creator_premium_required_title">จำเป็นต้องสมัครสมาชิก</string>
<string name="lut_creator_premium_required_desc">เมื่อไม่ได้กำหนดค่าคีย์ OpenAI API ของคุณเองในการตั้งค่า ฟังก์ชันการสร้าง LUT จำเป็นต้องซื้อการเป็นสมาชิกก่อนจึงจะสามารถใช้งานได้</string>
<string name="lut_creator_tab_ai">การวิเคราะห์เอไอ</string>
<string name="lut_creator_tab_local">การวิเคราะห์ในท้องถิ่น</string>
<string name="lut_creator_use_ai">AI จะสร้างเวอร์ชันข้อความของสูตร LUT ตามการเรนเดอร์ที่เลือก</string>
<string name="lut_creator_custom_ai_instructions">คำพร้อมท์ AI ที่กำหนดเอง (ไม่บังคับ)</string>
<string name="lut_creator_custom_ai_hint">ตัวอย่างเช่น: ทำให้ภาพมีบรรยากาศมากขึ้นและเพิ่มคอนทราสต์ให้ลึกซึ้งยิ่งขึ้น</string>
<string name="lut_creator_title">เลียนแบบสี</string>
<string name="lut_creator_desc">จับคู่ภาพต้นฉบับกับภาพที่แต่งสีแล้ว เพื่อเลียนแบบโทนสีและสร้าง LUT ของคุณเอง</string>
<string name="lut_creator_tab_local">คู่ภาพต้นฉบับ / ภาพแต่งสี</string>
<string name="lut_creator_select_images">เลือกรูปภาพ</string>
<string name="lut_creator_ai_mode_desc">อัปโหลดการเรนเดอร์ แล้ว AI จะอนุมานเวอร์ชันข้อความของสูตร LUT โดยตรง โดยไม่ต้องเรียกใช้ความสามารถในการแก้ไขรูปภาพ</string>
<string name="lut_creator_local_mode_desc">อัปโหลดรูปภาพหลายชุด โดยแต่ละชุดประกอบด้วยรูปภาพต้นฉบับและรูปภาพเอฟเฟกต์ และรูปภาพเหล่านั้นควรอยู่ในฉากเดียวกันที่สุดเท่าที่จะเป็นไปได้</string>
<string name="lut_creator_local_pairs_hint">การวิเคราะห์เฉพาะที่รองรับการจับคู่รูปภาพ/เอฟเฟกต์ต้นฉบับหลายชุด ยิ่งองค์ประกอบภาพ ค่าแสง และฉากมีความสอดคล้องกันมากเท่าใด จุดควบคุมที่รวมกันก็จะยิ่งมีความเสถียรมากขึ้นเท่านั้น</string>
<string name="lut_creator_local_mode_desc">เพิ่มคู่ภาพหนึ่งคู่หรือมากกว่า แต่ละคู่ประกอบด้วยภาพต้นฉบับและภาพที่แต่งสีแล้วของฉากเดียวกัน</string>
<string name="lut_creator_local_pairs_hint">ยิ่งมีคู่ภาพมากและองค์ประกอบภาพกับค่าแสงใกล้เคียงกัน LUT ที่ได้ก็จะยิ่งแม่นยำ</string>
<string name="lut_creator_select_source_image">เลือกภาพต้นฉบับ</string>
<string name="lut_creator_select_effect_image">เลือกการเรนเดอร์</string>
<string name="lut_creator_reset_local_selection">ล้างเนื้อหาที่เลือก</string>
@@ -764,10 +757,9 @@
<string name="lut_creator_local_pairs_count">เพิ่มรูปภาพกลุ่ม %1$d แล้ว</string>
<string name="lut_creator_local_pending_target">ขณะนี้ยังมีการเรนเดอร์อีก 1 ชุดที่ยังขาดอยู่</string>
<string name="lut_creator_local_ready_status">คุณสามารถเพิ่มกลุ่มรูปภาพต่อไปหรือเริ่มการวิเคราะห์ได้โดยตรง</string>
<string name="lut_creator_start_local_analysis">เริ่มการวิเคราะห์ในพื้นที่</string>
<string name="lut_creator_start_local_analysis">เริ่มวิเคราะห์</string>
<string name="lut_creator_analyzing">กำลังวิเคราะห์สไตล์ภาพ...</string>
<string name="lut_creator_analysis_complete">วิเคราะห์เสร็จแล้ว!</string>
<string name="lut_creator_ai_restored_preview">ดูตัวอย่างภาพต้นฉบับที่กู้คืนโดย AI</string>
<string name="lut_creator_lut_name_hint">ชื่อเริ่มต้นของ LUT</string>
<string name="lut_creator_generate_save">สร้างและบันทึก</string>
<string name="lut_creator_generating">กำลังสร้างข้อมูล 3D LUT...</string>
+7 -15
View File
@@ -1036,19 +1036,12 @@
<string name="settings_widget_theme_dark">深色</string>
<!-- LUT Creator & UI -->
<string name="lut_creator_title">AI 仿色</string>
<string name="lut_creator_desc">选择图片分析色彩风格,并生成专属 LUT。</string>
<string name="lut_creator_premium_required_title">需要会员</string>
<string name="lut_creator_premium_required_desc">未在设置中配置自己的 OpenAI API Key 时,LUT 创建功能需要购买会员后才能使用。</string>
<string name="lut_creator_tab_ai">AI 分析</string>
<string name="lut_creator_tab_local">本地分析</string>
<string name="lut_creator_use_ai">AI 会根据所选效果图生成文字版 LUT 配方。</string>
<string name="lut_creator_custom_ai_instructions">自定义 AI 提示词(选填)</string>
<string name="lut_creator_custom_ai_hint">例如:让画面更有氛围感,加深对比度</string>
<string name="lut_creator_title">仿色</string>
<string name="lut_creator_desc">用原图和效果图配对,复刻色彩风格并生成专属 LUT。</string>
<string name="lut_creator_tab_local">原图 / 效果图配对</string>
<string name="lut_creator_select_images">选择图片</string>
<string name="lut_creator_ai_mode_desc">上传一张效果图,AI 会直接推断文字版 LUT 配方,不再调用图片编辑能力。</string>
<string name="lut_creator_local_mode_desc">上传多组图片,每组包含一张原图和一张效果图,且应尽量是完全相同的场景。</string>
<string name="lut_creator_local_pairs_hint">本地分析支持多组原图/效果图配对。构图、曝光和场景越一致,合并后的控制点越稳定。</string>
<string name="lut_creator_local_mode_desc">添加一组或多组图片,每组包含同一场景的一张原图和一张调色后的效果图。</string>
<string name="lut_creator_local_pairs_hint">配对越多,构图和曝光越一致,生成的 LUT 越准确。</string>
<string name="lut_creator_select_source_image">选择原图</string>
<string name="lut_creator_select_effect_image">选择效果图</string>
<string name="lut_creator_reset_local_selection">清空已选内容</string>
@@ -1059,10 +1052,9 @@
<string name="lut_creator_local_pairs_count">已添加 %1$d 组图片</string>
<string name="lut_creator_local_pending_target">当前有 1 组还差效果图</string>
<string name="lut_creator_local_ready_status">可以继续添加图片组,或直接开始分析</string>
<string name="lut_creator_start_local_analysis">开始本地分析</string>
<string name="lut_creator_start_local_analysis">开始分析</string>
<string name="lut_creator_analyzing">正在分析图片风格…</string>
<string name="lut_creator_analysis_complete">分析完成!</string>
<string name="lut_creator_ai_restored_preview">AI 还原的原图预览</string>
<string name="lut_creator_lut_name_hint">LUT 预设名称</string>
<string name="lut_creator_generate_save">生成并保存</string>
<string name="lut_creator_generating">正在生成 3D LUT 数据…</string>
@@ -1113,7 +1105,7 @@
<string name="settings_default_virtual_aperture_description">开启后,拍摄及导入照片将自动应用所选光圈值的虚化效果。</string>
<string name="virtual_aperture_depth_model_description">使用当前已安装的兼容深度模型。首次使用时可下载默认模型,或导入其他兼容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_title">大光圈虚化</string>
<string name="gallery_large_aperture_blur_description">使用当前已安装的兼容深度模型估计画面深度,模拟大光圈的浅景深、背景虚化和柔和散景光斑。轻点画面可改变对焦位置;光圈值越小,虚化越强。首次使用时可下载默认模型,或导入其他兼容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_description">模拟大光圈的浅景深背景虚化效果</string>
<string name="gallery_bokeh_style_title">光斑风格</string>
<string name="gallery_bokeh_processing">虚化处理中…</string>
<string name="gallery_denoise_processing">降噪处理中…</string>
+7 -15
View File
@@ -1015,19 +1015,12 @@
<string name="settings_widget_theme_dark">深色</string>
<!-- LUT Creator & UI -->
<string name="lut_creator_title">AI 仿色</string>
<string name="lut_creator_desc">選擇圖片分析色彩風格,并生成專屬 LUT。</string>
<string name="lut_creator_premium_required_title">需要會員</string>
<string name="lut_creator_premium_required_desc">未在設定中配置自己的 OpenAI API Key 時,LUT 創建功能需要購買會員后才能使用。</string>
<string name="lut_creator_tab_ai">AI 分析</string>
<string name="lut_creator_tab_local">本地分析</string>
<string name="lut_creator_use_ai">AI 會根據所選效果圖生成文字版 LUT 配方。</string>
<string name="lut_creator_custom_ai_instructions">自訂 AI 提示詞(選填)</string>
<string name="lut_creator_custom_ai_hint">例如:讓畫面更有氛圍感,加深對比度</string>
<string name="lut_creator_title">仿色</string>
<string name="lut_creator_desc">用原圖和效果圖配對,複刻色彩風格並生成專屬 LUT。</string>
<string name="lut_creator_tab_local">原圖 / 效果圖配對</string>
<string name="lut_creator_select_images">選擇圖片</string>
<string name="lut_creator_ai_mode_desc">上傳一張效果圖,AI 會直接推斷文字版 LUT 配方,不再調用圖片編輯能力。</string>
<string name="lut_creator_local_mode_desc">上傳多組圖片,每組包含一張原圖和一張效果圖,且應盡量是完全相同的場景。</string>
<string name="lut_creator_local_pairs_hint">本地分析支援多組原圖/效果圖配對。構圖、曝光和場景越一致,合并后的控制點越穩定。</string>
<string name="lut_creator_local_mode_desc">添加一組或多組圖片,每組包含同一場景的一張原圖和一張調色後的效果圖。</string>
<string name="lut_creator_local_pairs_hint">配對越多,構圖和曝光越一致,生成的 LUT 越準確。</string>
<string name="lut_creator_select_source_image">選擇原圖</string>
<string name="lut_creator_select_effect_image">選擇效果圖</string>
<string name="lut_creator_reset_local_selection">清空已選內容</string>
@@ -1038,10 +1031,9 @@
<string name="lut_creator_local_pairs_count">已添加 %1$d 組圖片</string>
<string name="lut_creator_local_pending_target">當前有 1 組還差效果圖</string>
<string name="lut_creator_local_ready_status">可以繼續添加圖片組,或直接開始分析</string>
<string name="lut_creator_start_local_analysis">開始本地分析</string>
<string name="lut_creator_start_local_analysis">開始分析</string>
<string name="lut_creator_analyzing">正在分析圖片風格…</string>
<string name="lut_creator_analysis_complete">分析完成!</string>
<string name="lut_creator_ai_restored_preview">AI 還原的原圖預覽</string>
<string name="lut_creator_lut_name_hint">LUT 預設名稱</string>
<string name="lut_creator_generate_save">生成并儲存</string>
<string name="lut_creator_generating">正在生成 3D LUT 資料…</string>
@@ -1092,7 +1084,7 @@
<string name="settings_default_virtual_aperture_description">開啟后,拍攝及匯入相片將自動應用所選光圈值的虛化效果。</string>
<string name="virtual_aperture_depth_model_description">使用目前已安裝的兼容深度模型。首次使用時可下載預設模型,或匯入其他兼容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_title">大光圈虛化</string>
<string name="gallery_large_aperture_blur_description">使用目前已安裝的兼容深度模型估計畫面深度,模擬大光圈的淺景深、背景虛化和柔和散景光斑。輕點畫面可改變對焦位置;光圈值越小,虛化越強。首次使用時可下載預設模型,或匯入其他兼容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_description">模擬大光圈的淺景深背景虛化效果</string>
<string name="edit_panel_title">編輯面板</string>
<string name="edit_panel_expand">展開編輯面板</string>
<string name="edit_panel_minimize">最小化編輯面板</string>
+7 -15
View File
@@ -1015,19 +1015,12 @@
<string name="settings_widget_theme_dark">深色</string>
<!-- LUT Creator & UI -->
<string name="lut_creator_title">AI 仿色</string>
<string name="lut_creator_desc">選擇圖片分析色彩風格,并生成專屬 LUT。</string>
<string name="lut_creator_premium_required_title">需要會員</string>
<string name="lut_creator_premium_required_desc">未在設定中配置自己的 OpenAI API Key 時,LUT 創建功能需要購買會員后才能使用。</string>
<string name="lut_creator_tab_ai">AI 分析</string>
<string name="lut_creator_tab_local">本地分析</string>
<string name="lut_creator_use_ai">AI 會根據所選效果圖生成文字版 LUT 配方。</string>
<string name="lut_creator_custom_ai_instructions">自訂 AI 提示詞(選填)</string>
<string name="lut_creator_custom_ai_hint">例如:讓畫面更有氛圍感,加深對比度</string>
<string name="lut_creator_title">仿色</string>
<string name="lut_creator_desc">用原圖和效果圖配對,複刻色彩風格並生成專屬 LUT。</string>
<string name="lut_creator_tab_local">原圖 / 效果圖配對</string>
<string name="lut_creator_select_images">選擇圖片</string>
<string name="lut_creator_ai_mode_desc">上傳一張效果圖,AI 會直接推斷文字版 LUT 配方,不再調用圖片編輯能力。</string>
<string name="lut_creator_local_mode_desc">上傳多組圖片,每組包含一張原圖和一張效果圖,且應盡量是完全相同的場景。</string>
<string name="lut_creator_local_pairs_hint">本地分析支援多組原圖/效果圖配對。構圖、曝光和場景越一致,合并后的控制點越穩定。</string>
<string name="lut_creator_local_mode_desc">添加一組或多組圖片,每組包含同一場景的一張原圖和一張調色後的效果圖。</string>
<string name="lut_creator_local_pairs_hint">配對越多,構圖和曝光越一致,生成的 LUT 越準確。</string>
<string name="lut_creator_select_source_image">選擇原圖</string>
<string name="lut_creator_select_effect_image">選擇效果圖</string>
<string name="lut_creator_reset_local_selection">清空已選內容</string>
@@ -1038,10 +1031,9 @@
<string name="lut_creator_local_pairs_count">已添加 %1$d 組圖片</string>
<string name="lut_creator_local_pending_target">當前有 1 組還差效果圖</string>
<string name="lut_creator_local_ready_status">可以繼續添加圖片組,或直接開始分析</string>
<string name="lut_creator_start_local_analysis">開始本地分析</string>
<string name="lut_creator_start_local_analysis">開始分析</string>
<string name="lut_creator_analyzing">正在分析圖片風格…</string>
<string name="lut_creator_analysis_complete">分析完成!</string>
<string name="lut_creator_ai_restored_preview">AI 還原的原圖預覽</string>
<string name="lut_creator_lut_name_hint">LUT 預設名稱</string>
<string name="lut_creator_generate_save">生成并儲存</string>
<string name="lut_creator_generating">正在生成 3D LUT 資料…</string>
@@ -1092,7 +1084,7 @@
<string name="settings_default_virtual_aperture_description">開啟后,拍攝及匯入相片將自動應用所選光圈值的虛化效果。</string>
<string name="virtual_aperture_depth_model_description">使用目前已安裝的相容深度模型。首次使用時可下載預設模型,或匯入其他相容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_title">大光圈虛化</string>
<string name="gallery_large_aperture_blur_description">使用目前已安裝的相容深度模型估計畫面深度,模擬大光圈的淺景深、背景虛化和柔和散景光斑。輕點畫面可改變對焦位置;光圈值越小,虛化越強。首次使用時可下載預設模型,或匯入其他相容的 TFLite 模型。</string>
<string name="gallery_large_aperture_blur_description">模擬大光圈的淺景深背景虛化效果</string>
<string name="gallery_bokeh_style_title">光斑風格</string>
<string name="gallery_bokeh_processing">虛化處理中…</string>
<string name="gallery_denoise_processing">降噪處理中…</string>
+6 -14
View File
@@ -1049,18 +1049,11 @@
<!-- LUT Creator & UI -->
<string name="lut_creator_title">LUT Creator</string>
<string name="lut_creator_desc">Select images to analyze style and generate a custom LUT.</string>
<string name="lut_creator_premium_required_title">Premium required</string>
<string name="lut_creator_premium_required_desc">LUT Creator requires Premium unless you have configured your own OpenAI API key in Settings.</string>
<string name="lut_creator_tab_ai">AI Analysis</string>
<string name="lut_creator_tab_local">Local Analysis</string>
<string name="lut_creator_use_ai">AI will generate a text LUT recipe from the selected styled image.</string>
<string name="lut_creator_custom_ai_instructions">Custom AI Instructions (Optional)</string>
<string name="lut_creator_custom_ai_hint">e.g., make it moodier, enhance reds</string>
<string name="lut_creator_desc">Pair originals with styled images to recreate a color style as a custom LUT.</string>
<string name="lut_creator_tab_local">Original / Styled Pairs</string>
<string name="lut_creator_select_images">Select Images</string>
<string name="lut_creator_ai_mode_desc">Upload one styled image. AI will infer a text LUT recipe directly, without using image editing.</string>
<string name="lut_creator_local_mode_desc">Upload multiple image pairs. Each pair should include an original image and a styled image of the same scene.</string>
<string name="lut_creator_local_pairs_hint">For local analysis, add multiple original/styled pairs. The closer the framing and exposure match, the better the merged control points will be.</string>
<string name="lut_creator_local_mode_desc">Add one or more image pairs. Each pair is an original and a color-graded version of the same scene.</string>
<string name="lut_creator_local_pairs_hint">More pairs with closely matching framing and exposure give a more accurate LUT.</string>
<string name="lut_creator_select_source_image">Select Original Image</string>
<string name="lut_creator_select_effect_image">Select Styled Image</string>
<string name="lut_creator_reset_local_selection">Clear Selection</string>
@@ -1071,10 +1064,9 @@
<string name="lut_creator_local_pairs_count">%1$d image pair(s) added</string>
<string name="lut_creator_local_pending_target">1 pair is still waiting for its styled image</string>
<string name="lut_creator_local_ready_status">You can add more pairs or start analysis now</string>
<string name="lut_creator_start_local_analysis">Analyze Local Pairs</string>
<string name="lut_creator_start_local_analysis">Start Analysis</string>
<string name="lut_creator_analyzing">Analyzing image style...</string>
<string name="lut_creator_analysis_complete">Analysis Complete!</string>
<string name="lut_creator_ai_restored_preview">AI restored original preview</string>
<string name="lut_creator_lut_name_hint">LUT Name</string>
<string name="lut_creator_generate_save">Generate &amp; Save</string>
<string name="lut_creator_generating">Generating 3D Interpolated LUT...</string>
@@ -1125,7 +1117,7 @@
<string name="settings_default_virtual_aperture_description">Automatically enable virtual aperture with the selected f-stop value for new photos.</string>
<string name="virtual_aperture_depth_model_description">Uses the installed compatible depth model. Download the default model or import another compatible TFLite model on first use.</string>
<string name="gallery_large_aperture_blur_title">Wide-Aperture Blur</string>
<string name="gallery_large_aperture_blur_description">Uses the installed compatible depth model to estimate scene depth and simulate a shallow depth of field, background blur, and soft bokeh highlights. Tap the image to change the focus point. Lower f-numbers produce stronger blur. Download the default model or import another compatible TFLite model on first use.</string>
<string name="gallery_large_aperture_blur_description">Simulates the shallow depth of field and background blur of a wide aperture</string>
<string name="gallery_bokeh_style_title">Bokeh style</string>
<string name="gallery_bokeh_processing">Applying bokeh…</string>
<string name="gallery_denoise_processing">Applying noise reduction…</string>