Skip to content
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

Use rawprepare-cropped dimensions #17099

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

jenshannoschwalm
Copy link
Collaborator

Currently we use the cropping defaults for calculation of actually used sensor dimensions / ratio instead of what rawprepare actually does, there we have the (hidden by default) sliders defining the real crops.
Although unlikely it is a perfectly valid usecase to change those either by presets or UI.

This pr ensures the actually used p_width & p_height in dev->image_storage are

  1. correctly initialized while loading an image
  2. updated while committing parameters in rawprepare
  3. used wherever we want them, examples are lens, masks, crop & ashift if we want to keep sensor ratio.

For most images this won't do anything, expect subtle improvements if rawprepare does something different than default crops, also code is more clear.

@jenshannoschwalm jenshannoschwalm added feature: enhancement current features to improve scope: image processing correcting pixels scope: codebase making darktable source code easier to manage labels Jul 7, 2024
@jenshannoschwalm jenshannoschwalm added this to the 5.0 milestone Jul 7, 2024
@jenshannoschwalm jenshannoschwalm force-pushed the raw_width_49 branch 2 times, most recently from bb06d97 to ead9b34 Compare July 13, 2024 05:00
@jenshannoschwalm jenshannoschwalm force-pushed the raw_width_49 branch 2 times, most recently from 59b581c to 05d323f Compare July 31, 2024 04:42
Currently we use the cropping **defaults** for calculation of actually used sensor dimensions / ratio
instead of what rawprepare actually does, there we have the (hidden by default) sliders defining the
real crops.
Although unlikely it is a perfectly valid usecase to change those either by presets or UI.

This pr ensures the actually used p_width & p_height in dev->image_storage are
1. correctly initialized while loading an image
2. updated while committing parameters in rawprepare
3. used wherever we want them, examples are lens, masks, crop & ashift if we want to keep sensor ratio.

For most images this won't do anything, expect subtle improvements if rawprepare does something different than
default crops, also code is more clear.
Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me. Thanks!

@TurboGit TurboGit merged commit 531471c into darktable-org:master Aug 6, 2024
6 checks passed
@jenshannoschwalm jenshannoschwalm deleted the raw_width_49 branch August 6, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: enhancement current features to improve scope: codebase making darktable source code easier to manage scope: image processing correcting pixels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants