From 63a549a3b237c9f723893a272785633e14a2536f Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 18 Jul 2020 11:59:42 +0100 Subject: [PATCH] Ugly hack to hide the GPSVersionID bug see https://github.com/libvips/libvips/issues/394 --- libvips/foreign/exif.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libvips/foreign/exif.c b/libvips/foreign/exif.c index 3dc35ec5..3727af04 100644 --- a/libvips/foreign/exif.c +++ b/libvips/foreign/exif.c @@ -1204,7 +1204,11 @@ vips_exif_image_field( VipsImage *image, return( NULL ); } - if( !(tag = exif_tag_from_name( p + 1 )) ) { + /* GPSVersionID is tag 0 (the error return) so we have to + * test the name too. + */ + if( !(tag = exif_tag_from_name( p + 1 )) && + strcmp( p + 1, "GPSVersionID" ) != 0 ) { g_warning( _( "bad exif meta \"%s\"" ), field ); return( NULL ); }