-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automatic "apply_camera_style.lua" does not process (Pentax) DNG files #18139
Comments
Is_raw excludes dosaiced dng . Maybe that's the reason? |
The quick and dirty fix will work as long as you only import raws. If you import RAW+JPEG then the JPEG will get the style applied too. This also applies to any other non-raw formats that have EXIF camera info included. There are keyboard shortcuts that can be assigned to apply the styles to a selection of images or a whole collection. The script uses darktable's facilities for determining if an image is raw or not. You may want to raise an issue about your DNG file not being detected as a raw. |
@jenshannoschwalm if the demosaiced DNG was identified as raw, would darktable then try and demosaic it? |
Well a demosaiced dng would not be identified as |
Lua simply reads the flags set by darktable. I don't know if I want to go down the road of trying to "outsmart" darktable about what a raw is and is not. |
So, suppose I add an I have Canon's and they can shoot sraw. If I shoot sraw with one of my Canon's and import it, is it a raw or an s_raw? EDIT: @thetruemist can I have a file to test with? |
I know only about converted files . Would love to get hand on camera provided sraws. |
you could use the functions provided in common/image.c |
Sure. I copied some Pentax DNGs for cameras that I own(ed) to https://drive.google.com/drive/folders/1Ex1_Icuwd0aOhCP1tEpiRIuqKlphuOVN?usp=sharing The "K3III" is the newest, it's the only one I tested. No idea if it's already demosaiced. Did not try the others with the apply_camera_style yet. |
Looked and
I'll shoot some and put them somewhere for you. |
Both return false. But if I open one of the images in darkroom, rawprepare gets applied. EDIT: Both check the DT_IMAGE_S_RAW flag, but it's not set so they return false. EDIT 2: If I import the files and look at the flags the only flag set is 1 for 1 star. When I open them in darkroom, the raw flag and a couple of others get set. So, it looks like there is no current way to detect a DNG raw on import. |
Hmm, ok. Would it be possible to match the file name on *.DNG and additionally check maker=="Pentax"? Sure, a workaround, and if someone really creates a non-raw DNG from a Pentax image, and imports, then the style would get applied although it should probably not, but I think that's a pretty unlikely scenario (compared to ooc Pentax DNGs). |
Describe the bug
Steps to reproduce
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.
The text was updated successfully, but these errors were encountered: