bump minimum OpenSlide version to 3.3.0
- Avoid deprecated API - Drop unneeded g_log handler
This commit is contained in:
parent
6e74234ba7
commit
c98d65434b
@ -482,11 +482,11 @@ AC_ARG_WITH([openslide],
|
||||
AS_HELP_STRING([--without-openslide], [build without OpenSlide (default: test)]))
|
||||
|
||||
if test x"$with_openslide" != x"no"; then
|
||||
PKG_CHECK_MODULES(OPENSLIDE, openslide >= 3.2.5,
|
||||
[AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.2.5 installed.])
|
||||
PKG_CHECK_MODULES(OPENSLIDE, openslide >= 3.3.0,
|
||||
[AC_DEFINE(HAVE_OPENSLIDE,1,[define if you have OpenSlide >= 3.3.0 installed.])
|
||||
with_openslide=yes
|
||||
PACKAGES_USED="$PACKAGES_USED openslide"],
|
||||
[AC_MSG_WARN([OpenSlide >= 3.2.5 not found; disabling virtual slide support])
|
||||
[AC_MSG_WARN([OpenSlide >= 3.3.0 not found; disabling virtual slide support])
|
||||
with_openslide=no
|
||||
])
|
||||
fi
|
||||
@ -748,7 +748,7 @@ accelerate loops with orc: $with_orc
|
||||
ICC profile support with lcms: $with_lcms
|
||||
file import with OpenEXR: $with_OpenEXR
|
||||
file import with OpenSlide: $with_openslide
|
||||
(requires openslide-3.2.5 or later)
|
||||
(requires openslide-3.3.0 or later)
|
||||
file import with matio: $with_matio
|
||||
file import with cfitsio: $with_cfitsio
|
||||
text rendering with pangoft2: $with_pangoft2
|
||||
|
@ -33,6 +33,7 @@
|
||||
* - fail if both level and associated image are specified
|
||||
* 20/9/12
|
||||
* - update openslide_open error handling for 3.3.0 semantics
|
||||
* - switch from deprecated _layer_ functions
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -187,7 +188,7 @@ readslide_new( const char *filename, VipsImage *out,
|
||||
}
|
||||
|
||||
if( level < 0 ||
|
||||
level >= openslide_get_layer_count( rslide->osr ) ) {
|
||||
level >= openslide_get_level_count( rslide->osr ) ) {
|
||||
vips_error( "openslide2vips",
|
||||
"%s", _( "invalid slide level" ) );
|
||||
return( NULL );
|
||||
@ -205,9 +206,9 @@ readslide_new( const char *filename, VipsImage *out,
|
||||
vips_demand_hint( out, VIPS_DEMAND_STYLE_THINSTRIP, NULL );
|
||||
}
|
||||
else {
|
||||
openslide_get_layer_dimensions( rslide->osr,
|
||||
openslide_get_level_dimensions( rslide->osr,
|
||||
level, &w, &h );
|
||||
rslide->downsample = openslide_get_layer_downsample(
|
||||
rslide->downsample = openslide_get_level_downsample(
|
||||
rslide->osr, level );
|
||||
vips_image_set_int( out, "slide-level", level );
|
||||
vips_demand_hint( out, VIPS_DEMAND_STYLE_SMALLTILE, NULL );
|
||||
|
@ -8,6 +8,7 @@
|
||||
* - convert remaining uses of "layer" to "level"
|
||||
* 20/9/12
|
||||
* - add Leica filename suffix
|
||||
* - drop glib log handler (unneeded with >= 3.3.0)
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -133,13 +134,6 @@ vips_foreign_load_openslide_load( VipsForeignLoad *load )
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
static void
|
||||
vips_foreign_load_openslide_error_handler( const char *domain,
|
||||
GLogLevelFlags level, const char *message, void *data )
|
||||
{
|
||||
vips_error( "openslide", "%s", message );
|
||||
}
|
||||
|
||||
static const char *vips_foreign_openslide_suffs[] = {
|
||||
".svs", /* Aperio */
|
||||
".vms", ".vmu", ".ndpi", /* Hamamatsu */
|
||||
@ -197,12 +191,6 @@ vips_foreign_load_openslide_class_init( VipsForeignLoadOpenslideClass *class )
|
||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||
G_STRUCT_OFFSET( VipsForeignLoadOpenslide, associated ),
|
||||
NULL );
|
||||
|
||||
/* Catch just openslide errors.
|
||||
*/
|
||||
g_log_set_handler( "Openslide",
|
||||
G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING,
|
||||
vips_foreign_load_openslide_error_handler, NULL );
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user