fix a problem with shrinkv tail processing
Tail processing in shrinkv had an implicit assumption of round-down, but of course we round to nearest. Thanks angelmixu. see https://github.com/libvips/libvips/issues/1396
This commit is contained in:
parent
aafc2c7948
commit
d80ce4bf15
@ -7,6 +7,7 @@
|
|||||||
- fix build with GM
|
- fix build with GM
|
||||||
- add locks for pdfium load
|
- add locks for pdfium load
|
||||||
- fix build with MSVC
|
- fix build with MSVC
|
||||||
|
- fix a problem with shinkv tail processing [angelmixu]
|
||||||
|
|
||||||
24/5/19 started 8.8.1
|
24/5/19 started 8.8.1
|
||||||
- improve realpath() use on older libc
|
- improve realpath() use on older libc
|
||||||
|
@ -329,12 +329,12 @@ vips_shrinkv_gen( VipsRegion *or, void *vseq,
|
|||||||
r->top + r->height >= or->im->Ysize ) {
|
r->top + r->height >= or->im->Ysize ) {
|
||||||
/* First unused scanline. resample->in->Ysize because we want
|
/* First unused scanline. resample->in->Ysize because we want
|
||||||
* the height before the embed.
|
* the height before the embed.
|
||||||
|
*
|
||||||
|
* Because we round to nearest, unused can be negative.
|
||||||
*/
|
*/
|
||||||
int first = or->im->Ysize * shrink->vshrink;
|
int first = or->im->Ysize * shrink->vshrink;
|
||||||
int unused = resample->in->Ysize - first;
|
int unused = resample->in->Ysize - first;
|
||||||
|
|
||||||
g_assert( unused >= 0 );
|
|
||||||
|
|
||||||
for( y = 0; y < unused; y++ ) {
|
for( y = 0; y < unused; y++ ) {
|
||||||
VipsRect s;
|
VipsRect s;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user