feat: use embedded LSC for imported RAW files

This commit is contained in:
zhoubinjia committed 2026-07-14 10:30:44 +08:00
1 parent 9015917e1c
commit 9309325368
2 files changed
+8

No files matched your search

@@ -178,6 +178,10 @@ object GalleryManager {
context: Context,
metadata: MediaMetadata?
): Boolean {
// Imported DNG files carry their own residual/complete LSC gain map. Always let the
// RAW processor consume that embedded map; the user preference only controls RAW
// captured by this app.
if (metadata?.isImported == true) return true
return metadata?.rawLensShadingCorrectionEnabled
?: (ContentRepository.getInstance(context).userPreferencesRepository.userPreferences.firstOrNull()
?.rawLensShadingCorrectionEnabled ?: true)
@@ -74,6 +74,10 @@ class PhotoProcessor(
}
private suspend fun resolveRawLensShadingCorrectionEnabled(metadata: MediaMetadata): Boolean {
// Imported DNG files carry their own residual/complete LSC gain map. Always let the
// RAW processor consume that embedded map; the user preference only controls RAW
// captured by this app.
if (metadata.isImported) return true
return metadata.rawLensShadingCorrectionEnabled
?: (userPreferencesRepository.userPreferences.firstOrNull()?.rawLensShadingCorrectionEnabled ?: true)
}