darktable-org / darktable-org/darktable
Improve (documentation of) Framing module
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is your feature request related to a problem? Please describe.
I am struggling to use the framing module properly.
My workflow is the following: The image in darktable has size $(w_1, h_1)$ and let's say aspect $a_1 = \frac{h_1}{w_1}$. My print should have size $(w_2, h_2)$ and aspect $a_2 = \frac{h_2}{w_2}$.
I want to add framing accordingly, but I am not sure which values to enter in the framing module.
As an example, let's say $(w_1, h_1) = (1000\mathrm{px}, 1500\mathrm{px})$ and thus $a_1 = \frac{3}{2}$ and $a_2 = \frac{4}{3}$ with $(w_2, h_2) = (1250\mathrm{px}, 1667\mathrm{px})$.
I enter aspect 4:3. Now I get the following results:
- basis
width,auto,shorter, border size20%: expected width: $\frac{w_1}{1-0.2} = 1250\mathrm{px}$. Actual width $1313\mathrm{px}$. not as expected ❌ - basis
height,longer, border size10%: expected height: $\frac{h_1}{1-0.1} = 1667\mathrm{px}$. Actual height $1667\mathrm{px}$. as expected ✔️
There was also confusion about frame sizes in #20296 .
Describe the solution you'd like
The size of the final image and the frame size should be consistent and predictable. The user should not have to manually check whether the resulting frame sizes are actually the ones that were expected.
To achieve this, I suggest the following:
- Improve documentation by adding the formulas used to calculate the frame size (horizontal and vertical) based on the selected options. I only partially figured them out by trial and error.
- Add a short paragraph about how to obtain correct frames for the workflow described above.
- Add documentation about the meaning of
basis. What does auto, width, height, longer, shorter do exactly? - Reduce complexity by reducing the number of options for
basis. Maybe two (width, height) are sufficient? - The current formula to compute the frame size $x$ for the above use case is or at least should be, as far as I can see, $x = 1 - \frac{w_1}{w_2} = \frac{w_2 - w_1}{w_2} .$
For this specific use case it would be more convenient to use $x = \frac{w_2}{w_1}.$
Evaluate whether it makes sense to use the second formula. There might be use cases that I am unaware of where the current formula is more convenient , though.
Alternatives
None
Additional context
None
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 with the Framing module and review the behavior described in the examples, then read the discussion in issue #20296 for related frame-size confusion. Document the formulas for horizontal and vertical frame sizes, explain each basis option, and add the requested workflow example; completion should make the resulting sizes predictable without trial and error.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100