Skip to content

Commit

Permalink
Revert vips_embed() change
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Nov 27, 2024
1 parent d9e9bdf commit 6db7b28
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions libvips/resample/shrinkv.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,7 @@ vips_shrinkv_uchar_vector_gen(VipsRegion *out_region,
s.left = r->left;
s.top = (r->top + y) * shrink->vshrink;
s.width = r->width;
/* Needs to access an additional `vshrink` scanlines.
*/
s.height = chunk_height * shrink->vshrink + shrink->vshrink;
s.height = chunk_height * shrink->vshrink;
#ifdef DEBUG
printf("vips_shrinkv_uchar_vector_gen: requesting %d lines from %d\n",
s.height, s.top);
Expand Down Expand Up @@ -402,12 +400,12 @@ vips_shrinkv_build(VipsObject *object)
if (shrink->vshrink == 1)
return vips_image_write(in, resample->out);

/* We need new pixels along the bottom so that we don't have small chunks
* to average along the bottom edge.
/* Make the height a multiple of the shrink factor so we don't need to
* average half pixels.
*/
if (vips_embed(in, &t[1],
0, 0,
in->Xsize, in->Ysize + shrink->vshrink,
in->Xsize, VIPS_ROUND_UP(in->Ysize, shrink->vshrink),
"extend", VIPS_EXTEND_COPY,
NULL))
return -1;
Expand Down

0 comments on commit 6db7b28

Please sign in to comment.