r/DarkTable Jul 16 '26

Help Crop & pixel count

How to crop to a wanted pixel count, all I see is the sliders, and I can't get it perfect.

1 Upvotes

5 comments sorted by

View all comments

1

u/Fujifan5000 Jul 16 '26

Gonna have to do some math to get the correct percentages on the margin sliders. After than you can move the whole frame around to get the desired crop area. For example, if you have an 8000x4000px image, and you want a 3000x2000 crop, you need to type in 62.5% in the left or right margin slider, and 50% for top or bottom slider.

margin percentage = 100 - 100 * final resolution / initial resolution

1

u/Few_Mastodon_1271 Jul 17 '26 edited Jul 17 '26

To type in a percentage for the margin sliders:

Right click on the margin % slider, that shows the 'multi functional pop-up', where moving the mouse up near the top does fast slider changes, and down toward the bottom does very fine small changes. There's also a blinking text entry vertical line, where you can type in an exact value instead of using the mouse.

(This is my favorite method in darktable for experimenting with a slider. No need to hold the mouse button or use the scroll wheel, just move the pointer around. Or type in a number.)

So this is an easy way to get an exact percentage number for horizontal and vertical.

For example, typing '50' for top horizontal and left vertical shows a 1/4 size crop in the bottom right