darktable-org / darktable-org/darktable
automatic "apply_camera_style.lua" does not process (Pentax) DNG files
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Describe the bug
- I activated the "official/apply_camera_style.lua"
- it works for e.g. Samsung NX500 *.SRW files
- it does not process Pentax *.DNG files
Steps to reproduce
- Activate "official/apply_camera_style.lua"
- Import a Pentax *.DNG file
- The existing camera style is not applied
Expected behavior
apply the resp. camera style
Logfile | Screenshot | Screencast
When running with "-d lua", there is no output from "apply_camera_style.lua" when *.DNG is imported, so no log available. A good log output is seen for *.SRW.
Commit
No response
Where did you obtain darktable from?
self compiled
darktable version
5.0.0
What OS are you using?
Linux
What is the version of your OS?
Debian 12
Describe your system?
No response
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
Nvidia
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
The reason for this behavior is the "if image.is_raw then" condition in the "function(event, image)" which is registered as a post-import-image hook. "image.is_raw" seems to be "false" for (Pentax) *.DNG files, but they are raw for sure.
I have commented it out:
dt.register_event(MODULE, "post-import-image",
function(event, image)
-- if image.is_raw then
table.insert(acs.imported_images, image)
-- end
end
)
Now it works for me, but it's a quick-and-dirty fix only.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in official/apply_camera_style.lua, especially the post-import-image hook and its image.is_raw check; compare behavior for Pentax DNG and Samsung SRW imports. Reproduce with -d lua and verify that importing a Pentax DNG applies the existing camera style without regressing SRW handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100