diff --git a/libvips/resample/affine.c b/libvips/resample/affine.c index bb2349e2..a13a24df 100644 --- a/libvips/resample/affine.c +++ b/libvips/resample/affine.c @@ -381,7 +381,7 @@ vips_affine_build( VipsObject *object ) if( VIPS_OBJECT_CLASS( vips_affine_parent_class )->build( object ) ) return( -1 ); - if( vips_check_coding_noneorlabq( class->nickname, in ) ) + if( vips_check_coding_noneorlabq( class->nickname, resample->in ) ) return( -1 ); if( vips_check_vector_length( class->nickname, affine->matrix->n, 4 ) ) @@ -391,6 +391,9 @@ vips_affine_build( VipsObject *object ) affine->oarea->n, 4 ) ) return( -1 ); + if( !vips_object_argument_isset( object, "interpolate" ) ) + affine->interpolate = vips_interpolate_new( "bilinear" ); + in = resample->in; /* Set up transform. @@ -454,7 +457,7 @@ vips_affine_build( VipsObject *object ) /* Add new pixels around the input so we can interpolate at the edges. */ - if( vips_embed( in, &t[1], 1, + if( vips_embed( in, &t[1], window_offset, window_offset, in->Xsize + window_size, in->Ysize + window_size, "extend", VIPS_EXTEND_COPY, diff --git a/libvips/resample/quadratic.c b/libvips/resample/quadratic.c index e0936d65..8b7b7f8b 100644 --- a/libvips/resample/quadratic.c +++ b/libvips/resample/quadratic.c @@ -278,9 +278,7 @@ vips_quadratic_build( VipsObject *object ) } if( !vips_object_argument_isset( object, "interpolator" ) ) - g_object_set( object, - "interpolate", vips_interpolate_new( "bilinear" ), - NULL ); + quadratic->interpolate = vips_interpolate_new( "bilinear" ); interpolate = quadratic->interpolate; window_size = vips_interpolate_get_window_size( interpolate );