From 1ca20dbdddd9de3ff04f706a76b6366147b7a71d Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 2 Jan 2021 19:07:00 +0000 Subject: [PATCH] make vips format detection a little more robust --- libvips/iofuncs/image.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvips/iofuncs/image.c b/libvips/iofuncs/image.c index 3ea04a83..29f92d3b 100644 --- a/libvips/iofuncs/image.c +++ b/libvips/iofuncs/image.c @@ -921,7 +921,7 @@ vips_image_build( VipsObject *object ) /* Make sure the vips saver is there ... strange things will * happen if this type is renamed or removed. */ - g_assert( g_type_from_name( "VipsForeignSaveVipsFile" ) ); + g_assert( g_type_from_name( "VipsForeignSaveVips" ) ); if( !(file_op = vips_foreign_find_save( filename )) ) return( -1 ); @@ -930,7 +930,7 @@ vips_image_build( VipsObject *object ) * Otherwise save with VipsForeign when the image has been * written to. */ - if( strcmp( file_op, "VipsForeignSaveVipsFile" ) == 0 ) + if( vips_isprefix( "VipsForeignSaveVips", file_op ) ) image->dtype = VIPS_IMAGE_OPENOUT; else { image->dtype = VIPS_IMAGE_PARTIAL;