Skip to content

Commit 78ddb59

Browse files
committed
Clipping iop: _ratio_get_aspect(): Fixes #9942, Fixes #10265
(cherry picked from commit 628267a)
1 parent fdac526 commit 78ddb59

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/iop/clipping.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,8 +1266,11 @@ static float _ratio_get_aspect(dt_iop_module_t *self)
12661266
{
12671267
dt_iop_clipping_params_t *p = (dt_iop_clipping_params_t *)self->params;
12681268

1269-
int iwd, iht;
1270-
dt_dev_get_processed_size(darktable.develop, &iwd, &iht);
1269+
// we want to know the size of the actual buffer
1270+
dt_dev_pixelpipe_iop_t *piece = dt_dev_distort_get_iop_pipe(self->dev, self->dev->preview_pipe, self);
1271+
if(!piece) return 0;
1272+
1273+
const int iwd = piece->buf_in.width, iht = piece->buf_in.height;
12711274

12721275
// if we do not have yet computed the aspect ratio, let's do it now
12731276
if(p->ratio_d == -2 && p->ratio_n == -2)

0 commit comments

Comments
 (0)