darktable-org / darktable-org/darktable

automatic "apply_camera_style.lua" does not process (Pentax) DNG files

Open
#18,139 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

lua scope: camera support
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
  1. Activate "official/apply_camera_style.lua"
  2. Import a Pentax *.DNG file
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.