Fix centre convention
This commit is contained in:
parent
fdc140e8e9
commit
4533375f63
@ -480,7 +480,7 @@ vips_reduceh_build( VipsObject *object )
|
|||||||
* by half that distance so that we discard pixels equally
|
* by half that distance so that we discard pixels equally
|
||||||
* from left and right.
|
* from left and right.
|
||||||
*/
|
*/
|
||||||
reduceh->hoffset = (1 + extra_pixels) / 2.0;
|
reduceh->hoffset = (1 + extra_pixels) / 2.0 - 1;
|
||||||
|
|
||||||
/* Build the tables of pre-computed coefficients.
|
/* Build the tables of pre-computed coefficients.
|
||||||
*/
|
*/
|
||||||
@ -518,7 +518,7 @@ vips_reduceh_build( VipsObject *object )
|
|||||||
/* Add new pixels around the input so we can interpolate at the edges.
|
/* Add new pixels around the input so we can interpolate at the edges.
|
||||||
*/
|
*/
|
||||||
if( vips_embed( in, &t[1],
|
if( vips_embed( in, &t[1],
|
||||||
reduceh->n_point / 2 - 1, 0,
|
VIPS_CEIL( reduceh->n_point / 2.0 ) - 1, 0,
|
||||||
in->Xsize + reduceh->n_point, in->Ysize,
|
in->Xsize + reduceh->n_point, in->Ysize,
|
||||||
"extend", VIPS_EXTEND_COPY,
|
"extend", VIPS_EXTEND_COPY,
|
||||||
(void *) NULL ) )
|
(void *) NULL ) )
|
||||||
|
@ -853,7 +853,7 @@ vips_reducev_build( VipsObject *object )
|
|||||||
* by half that distance so that we discard pixels equally
|
* by half that distance so that we discard pixels equally
|
||||||
* from left and right.
|
* from left and right.
|
||||||
*/
|
*/
|
||||||
reducev->voffset = (1 + extra_pixels) / 2.0;
|
reducev->voffset = (1 + extra_pixels) / 2.0 - 1;
|
||||||
|
|
||||||
/* Build the tables of pre-computed coefficients.
|
/* Build the tables of pre-computed coefficients.
|
||||||
*/
|
*/
|
||||||
@ -891,7 +891,7 @@ vips_reducev_build( VipsObject *object )
|
|||||||
/* Add new pixels around the input so we can interpolate at the edges.
|
/* Add new pixels around the input so we can interpolate at the edges.
|
||||||
*/
|
*/
|
||||||
if( vips_embed( in, &t[1],
|
if( vips_embed( in, &t[1],
|
||||||
0, reducev->n_point / 2 - 1,
|
0, VIPS_CEIL( reducev->n_point / 2.0 ) - 1,
|
||||||
in->Xsize, in->Ysize + reducev->n_point,
|
in->Xsize, in->Ysize + reducev->n_point,
|
||||||
"extend", VIPS_EXTEND_COPY,
|
"extend", VIPS_EXTEND_COPY,
|
||||||
(void *) NULL ) )
|
(void *) NULL ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user