feat: use embedded LSC for imported RAW files
This commit is contained in:
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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user