From 4918a67e14d53ad29e479cb6dc362e350c8b48db Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 18 Jun 2011 17:42:06 +0100 Subject: [PATCH] init more types on startup create VipsImage and VipsRegion types on vips_init() --- libvips/iofuncs/image.c | 2 ++ libvips/iofuncs/init.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/libvips/iofuncs/image.c b/libvips/iofuncs/image.c index 7f6341c2..c304ab81 100644 --- a/libvips/iofuncs/image.c +++ b/libvips/iofuncs/image.c @@ -1073,6 +1073,8 @@ vips_image_class_init( VipsImageClass *class ) VipsObjectClass *vobject_class = VIPS_OBJECT_CLASS( class ); GParamSpec *pspec; + VIPS_DEBUG_MSG( "vips_image_class_init:\n" ); + /* Pass in a nonsense name for argv0 ... this init world is only here * for old programs which are missing an vips_init() call. We must * have threads set up before we can process. diff --git a/libvips/iofuncs/init.c b/libvips/iofuncs/init.c index 521d8fe8..12289e9f 100644 --- a/libvips/iofuncs/init.c +++ b/libvips/iofuncs/init.c @@ -131,6 +131,10 @@ vips_get_argv0( void ) * * * + * creates the main vips types, including VipsImage and friends + * + * + * * loads any plugins from $libdir/vips-x.y, where x and y are the * major and minor version numbers for this VIPS. * @@ -213,6 +217,8 @@ vips_init( const char *argv0 ) /* Register base vips types. */ + (void) vips_image_get_type(); + (void) vips_region_get_type(); vips__meta_init_types(); vips__interpolate_init(); im__format_init();