Bug 497814 - Add Support for Configurable Output Color Profile When Editing with darktable
Summary: Add Support for Configurable Output Color Profile When Editing with darktable
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-RawImport-Darktable (show other bugs)
Version: 8.5.0
Platform: Homebrew (macOS) macOS
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-23 07:48 UTC by qp.ding
Modified: 2024-12-23 11:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qp.ding 2024-12-23 07:48:22 UTC
SUMMARY
It would be great if users can have control over the output color profile used by the export module in darktable when using darktable as the raw import tool.

STEPS TO REPRODUCE
1. Set in "Digikam Configure ->  Image Editor -> Raw Behavior -> Always open the Raw Import Tool to customized settings" as Raw Import using Darktable.
2. Select a raw image, click Image Editor, edit the raw file in the invoked darktable instance.
3. Quit darktable after developing. Save changes in Digikam Image Editor UI, get a *.jpeg file.

OBSERVED RESULT
The saved jpeg file has Linear Rec709 color profile.

EXPECTED RESULT
The saved jpeg file has a color profile upon user choice, or at least sRGB, which is considered to be web-safe.

SOFTWARE/OS VERSIONS
macOS: Sequoia 15.2

ADDITIONAL INFORMATION
I am submitting this feature request out of two reasons.
1) Digikam itself has a buggy rendering when a jpeg file has a color profile other than sRGB. My exported jpeg files (with Linear Rec709) from darktable following the aforementioned workflow sometimes lead to a much darker rendering in Digikam compared with their sRGB conversions. But I'll file a separate issue on this.
2) Some apps on iOS 18 also cannot render the jpeg with Linear Rec709 correctly.

From the internal debug log I can see that Digikam is invoking darktable overwriting the settings in darktablerc with icctype=3 (default is icctype=-1):
```
digikam.dplugin.rawimport: DarkTable arguments: QList("--library", ":memory:", "--luacmd", "dofile('/private/var/folders/fm/scct14x5025d_05z2nyx9v800000gn/T/LuaScript-HUnnSU-4b48951f')", "--conf", "plugins/lighttable/export/icctype=3", "--conf", "lua/export_on_exit/export_filename=/private/var/folders/fm/scct14x5025d_05z2nyx9v800000gn/T/Darktable-GEVtBb-22ac5088", "/System/Volumes/Data/Users/quinn/Pictures/digikam_garage/2024-12-21/20241221T141934_1.ARW")
```
which seems to set the output color profile to Linear Rec709 in a hard coded manner. Can there be some flexibility in setting this color profile? I cannot seem to find related settings after some googling.
Comment 1 Maik Qualmann 2024-12-23 11:35:18 UTC
Git commit 92f171b727c986a0fccbf1deee8c5892ab69acd4 by Maik Qualmann.
Committed on 23/12/2024 at 11:34.
Pushed by mqualmann into branch 'master'.

change output color space for the darktable raw plugin

M  +1    -1    core/dplugins/rawimport/darktable/rawimportdarktableplugin.cpp

https://invent.kde.org/graphics/digikam/-/commit/92f171b727c986a0fccbf1deee8c5892ab69acd4