From b42a542858b6cd71dd2fa174cfc621d39f7db475 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 24 Oct 2020 12:42:50 +0100 Subject: [PATCH] only remove main image (ifd0) orientation tag we were stripping all orientation tags on autorot see https://github.com/libvips/libvips/issues/1865 --- libvips/conversion/autorot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libvips/conversion/autorot.c b/libvips/conversion/autorot.c index b297dc95..9cd92df0 100644 --- a/libvips/conversion/autorot.c +++ b/libvips/conversion/autorot.c @@ -9,6 +9,9 @@ * 10/5/20 * - handle mirrored images * - deprecate vips_autorot_get_angle() + * 24/10/20 + * - only remove main image orientation, since we don't rotate the + * embedded thumbnail */ /* @@ -69,8 +72,7 @@ static void * vips_autorot_remove_angle_sub( VipsImage *image, const char *field, GValue *value, void *my_data ) { - if( vips_isprefix( "exif-", field ) && - vips_ispostfix( field, "-Orientation" ) ) { + if( strcmp( field, "exif-ifd0-Orientation" ) == 0 ) { #ifdef DEBUG printf( "vips_autorot_remove_angle: %s\n", field ); #endif /*DEBUG*/