diff --git a/libvips/foreign/openslide2vips.c b/libvips/foreign/openslide2vips.c index 6cfe15d7..4a03e1a6 100644 --- a/libvips/foreign/openslide2vips.c +++ b/libvips/foreign/openslide2vips.c @@ -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 ),