handle other exif orientation tag values

though not the mirroring ones
This commit is contained in:
John Cupitt 2014-03-10 13:25:02 +00:00
parent 66d0e28dc2
commit a2b760c523

View File

@ -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 );