From 5eb684bff754b7536849ec8f30fcaae1eba6e901 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 28 Nov 2011 09:39:20 +0000 Subject: [PATCH] sync --- TODO | 13 +++++++++++-- libvips/file/vipsload.c | 11 +++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 602e9d0c..6d18b34c 100644 --- a/TODO +++ b/TODO @@ -1,11 +1,20 @@ -- make compat wrappers for old im_jpeg2vips() and im_vips2jpeg() +- do jpegbuffer load and save + + need a jpegsave base class, with subclasses for save to file and save to + buffer + + same for jpegload + + make compat wrappers for old im_jpeg2vips() and im_vips2jpeg() make sure we are using the operation cache for jpegload - move format/* to deprecated + have something to print the cache before we flush it? try tiff load + move format/* to deprecated + diff --git a/libvips/file/vipsload.c b/libvips/file/vipsload.c index 65b3b0a5..fbff46a1 100644 --- a/libvips/file/vipsload.c +++ b/libvips/file/vipsload.c @@ -82,14 +82,17 @@ vips_file_load_vips_header( VipsFileLoad *load ) if( !(out2 = vips_image_new_from_file( file->filename )) ) return( -1 ); - /* Unref the @out that's there now. + /* Remove the @out that's there now. */ g_object_get( load, "out", &out, NULL ); - g_object_unref( out ); - g_object_unref( out ); - g_object_set( load, "out", out2, NULL ); + /* Unref after we install the new out to make sure load isn't + * disposed. + */ + g_object_unref( out ); + g_object_unref( out ); + return( 0 ); }