Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3b6691dd57
@ -24,6 +24,8 @@
|
|||||||
* 11/12/11
|
* 11/12/11
|
||||||
* - move argb->rgba into conversion
|
* - move argb->rgba into conversion
|
||||||
* - turn into a set of read fns ready to be called from a class
|
* - turn into a set of read fns ready to be called from a class
|
||||||
|
* 28/2/12
|
||||||
|
* - convert "layer" to "level" where externally visible
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -161,7 +163,7 @@ readslide_new( const char *filename, VipsImage *out,
|
|||||||
if( layer < 0 ||
|
if( layer < 0 ||
|
||||||
layer >= openslide_get_layer_count( rslide->osr ) ) {
|
layer >= openslide_get_layer_count( rslide->osr ) ) {
|
||||||
vips_error( "openslide2vips",
|
vips_error( "openslide2vips",
|
||||||
"%s", _( "invalid slide layer" ) );
|
"%s", _( "invalid slide level" ) );
|
||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +183,7 @@ readslide_new( const char *filename, VipsImage *out,
|
|||||||
layer, &w, &h );
|
layer, &w, &h );
|
||||||
rslide->downsample = openslide_get_layer_downsample(
|
rslide->downsample = openslide_get_layer_downsample(
|
||||||
rslide->osr, layer );
|
rslide->osr, layer );
|
||||||
vips_image_set_int( out, "slide-layer", layer );
|
vips_image_set_int( out, "slide-level", layer );
|
||||||
vips_demand_hint( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL );
|
vips_demand_hint( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
*
|
*
|
||||||
* 5/12/11
|
* 5/12/11
|
||||||
* - from openslideload.c
|
* - from openslideload.c
|
||||||
|
* 28/2/12
|
||||||
|
* - convert "layer" to "level" where externally visible
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -177,9 +179,9 @@ vips_foreign_load_openslide_class_init( VipsForeignLoadOpenslideClass *class )
|
|||||||
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, filename ),
|
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, filename ),
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "layer", 10,
|
VIPS_ARG_INT( class, "level", 10,
|
||||||
_( "Layer" ),
|
_( "Level" ),
|
||||||
_( "Load this layer from the file" ),
|
_( "Load this level from the file" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, layer ),
|
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, layer ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user