From 406e228c9b79ff1421c1e1cc30bc49bd2a38e6a8 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 26 Nov 2017 15:24:40 +0000 Subject: [PATCH] vips_resize() is always centre convention it was corner for downsize, but should be centre to match imagemagick --- ChangeLog | 2 +- libvips/resample/resize.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 06657cb3..8152e23d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,7 +39,7 @@ - fix nasty jaggies on the edges of affine output, thanks chregu - add gif-delay, gif-comment and gif-loop metadata - add dispose handling to gifload -- deprecate the "centre" option for vips_resize(): it's now automatic +- deprecate the "centre" option for vips_resize(): it's now always on 29/8/17 started 8.5.9 - make --fail stop jpeg read on any libjpeg warning, thanks @mceachen diff --git a/libvips/resample/resize.c b/libvips/resample/resize.c index 7b67a915..5865d484 100644 --- a/libvips/resample/resize.c +++ b/libvips/resample/resize.c @@ -27,7 +27,7 @@ * 15/10/17 * - make LINEAR and CUBIC adaptive * 25/11/17 - * - deprecate --centre ... it's now automatic, thanks tback + * - deprecate --centre ... it's now always on, thanks tback */ /* @@ -215,6 +215,7 @@ vips_resize_build( VipsObject *object ) g_info( "residual reducev by %g", vscale ); if( vips_reducev( in, &t[2], 1.0 / vscale, "kernel", resize->kernel, + "centre", TRUE, NULL ) ) return( -1 ); in = t[2]; @@ -225,6 +226,7 @@ vips_resize_build( VipsObject *object ) hscale ); if( vips_reduceh( in, &t[3], 1.0 / hscale, "kernel", resize->kernel, + "centre", TRUE, NULL ) ) return( -1 ); in = t[3]; @@ -397,7 +399,7 @@ vips_resize_init( VipsResize *resize ) * then the image is shrunk again to the * target size with vips_reduce(). How much is done by vips_shrink() vs. * vips_reduce() varies with the @kernel setting. Downsizing is done with - * corner convention. + * centre convention. * * vips_resize() normally uses #VIPS_KERNEL_LANCZOS3 for the final reduce, you * can change this with @kernel.