This commit is contained in:
John Cupitt 2014-02-05 09:49:35 +00:00
parent 8e1ae0c6ec
commit 20b93262b6
1 changed files with 9 additions and 5 deletions

View File

@ -374,6 +374,15 @@ vips_flood_build( VipsObject *object )
if( VIPS_OBJECT_CLASS( vips_flood_parent_class )->build( object ) )
return( -1 );
/* If @test and @image are different, we must be in !@equal mode, ie.
* searching for pixels not like the start pixel.
*/
/* @test defaults to @image.
*/
if( !vips_object_argument_isset( object, "test" ) )
flood->test = draw->image;
flood->tsize = VIPS_IMAGE_SIZEOF_PEL( flood->test );
flood->left = flood->x;
flood->top = flood->y;
@ -385,11 +394,6 @@ vips_flood_build( VipsObject *object )
if( !(flood->edge = (VipsPel *) im_malloc( NULL, flood->tsize )) )
return( -1 );
/* @test defaults to @image.
*/
if( !vips_object_argument_isset( object, "test" ) )
flood->test = draw->image;
if( vips_image_wio_input( flood->test ) ||
vips_check_coding_known( class->nickname, flood->test ) ||
vips_check_uncoded( class->nickname, flood->test ) ||