fail if both level and associated image are specified

rather than silently ignoring the level.
This commit is contained in:
Benjamin Gilbert 2012-04-11 13:59:41 -04:00
parent 9fb078461c
commit 334452d681
1 changed files with 9 additions and 0 deletions

View File

@ -29,6 +29,8 @@
* 9/4/12
* - move argb2rgba back in here, we don't have a use for coded pixels
* - small cleanups
* 11/4/12
* - fail if both level and associated image are specified
*/
/*
@ -149,6 +151,13 @@ readslide_new( const char *filename, VipsImage *out,
const char *background;
const char * const *properties;
if( level && associated ) {
vips_error( "openslide2vips",
"%s", _( "specify only one of level or associated "
"image" ) );
return( NULL );
}
rslide = VIPS_NEW( out, ReadSlide );
memset( rslide, 0, sizeof( *rslide ) );
g_signal_connect( out, "close", G_CALLBACK( readslide_destroy_cb ),