From a2b760c5230b1cea05fb82339627db0f92ecdb0c Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 10 Mar 2014 13:25:02 +0000 Subject: [PATCH] handle other exif orientation tag values though not the mirroring ones --- tools/vipsthumbnail.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/vipsthumbnail.c b/tools/vipsthumbnail.c index 016e3902..dc130765 100644 --- a/tools/vipsthumbnail.c +++ b/tools/vipsthumbnail.c @@ -146,6 +146,18 @@ get_angle( VipsImage *im ) !vips_image_get_string( im, ORIENTATION, &orientation ) ) { if( vips_isprefix( "6", orientation ) ) angle = VIPS_ANGLE_90; + else if( vips_isprefix( "8", orientation ) ) + angle = VIPS_ANGLE_270; + else if( vips_isprefix( "3", orientation ) ) + angle = VIPS_ANGLE_180; + + /* Other values do rotate + mirror, don't bother handling them + * though, how common can mirroring be. + * + * See: + * + * http://www.80sidea.com/archives/2316 + */ } return( angle );