From 3eca1ff3ee372e131edb0cadca82903b0ff1c9ac Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 6 Oct 2019 19:29:10 +0100 Subject: [PATCH] heifload passes the new descriptor tests --- libvips/foreign/heifload.c | 7 +++++++ test/test_descriptors.sh | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libvips/foreign/heifload.c b/libvips/foreign/heifload.c index d6a5d249..acf495b5 100644 --- a/libvips/foreign/heifload.c +++ b/libvips/foreign/heifload.c @@ -645,6 +645,8 @@ vips_foreign_load_heif_header( VipsForeignLoad *load ) if( vips_foreign_load_heif_set_header( heif, load->out ) ) return( -1 ); + vips_foreign_load_heif_close( heif ); + return( 0 ); } @@ -784,6 +786,8 @@ static int vips_foreign_load_heif_load( VipsForeignLoad *load ) { VipsForeignLoadHeif *heif = (VipsForeignLoadHeif *) load; + VipsForeignLoadHeifClass *class = + VIPS_FOREIGN_LOAD_HEIF_GET_CLASS( heif ); VipsImage **t = (VipsImage **) vips_object_local_array( VIPS_OBJECT( load ), 3 ); @@ -792,6 +796,9 @@ vips_foreign_load_heif_load( VipsForeignLoad *load ) printf( "vips_foreign_load_heif_load: loading image\n" ); #endif /*DEBUG*/ + if( class->open( heif ) ) + return( -1 ); + t[0] = vips_image_new(); if( vips_foreign_load_heif_set_header( heif, t[0] ) ) return( -1 ); diff --git a/test/test_descriptors.sh b/test/test_descriptors.sh index 02be52dd..ad7c805f 100755 --- a/test/test_descriptors.sh +++ b/test/test_descriptors.sh @@ -12,8 +12,7 @@ if test_supported jpegload; then fi if test_supported heifload; then - # ./test_descriptors $test_images/Example1.heic - echo + ./test_descriptors $test_images/Example1.heic fi if test_supported gifload; then