From 472f9da0ad7b7821d7cb441c697fe1fe2e44ee27 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 28 Jan 2019 14:30:12 +0000 Subject: [PATCH] add XMP read to heifload --- libvips/foreign/heifload.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/libvips/foreign/heifload.c b/libvips/foreign/heifload.c index 19f7d6f4..e118a0ed 100644 --- a/libvips/foreign/heifload.c +++ b/libvips/foreign/heifload.c @@ -250,13 +250,6 @@ vips_foreign_load_heif_set_header( VipsForeignLoadHeif *heif, VipsImage *out ) unsigned char *data; char name[256]; - /* exif has a special name. - */ - if( strcasecmp( type, "exif" ) == 0 ) - vips_snprintf( name, 256, VIPS_META_EXIF_NAME ); - else - vips_snprintf( name, 256, "heif-%s-%d", type, i ); - printf( "metadata type = %s, length = %zd\n", type, length ); if( !(data = VIPS_ARRAY( out, length, unsigned char )) ) @@ -276,6 +269,19 @@ vips_foreign_load_heif_set_header( VipsForeignLoadHeif *heif, VipsImage *out ) length -= 4; } + /* exif has a special name. + * + * XMP metadata is just attached with the "mime" type, and + * usually start with "