handle other exif orientation tag values
though not the mirroring ones
This commit is contained in:
parent
66d0e28dc2
commit
a2b760c523
@ -146,6 +146,18 @@ get_angle( VipsImage *im )
|
|||||||
!vips_image_get_string( im, ORIENTATION, &orientation ) ) {
|
!vips_image_get_string( im, ORIENTATION, &orientation ) ) {
|
||||||
if( vips_isprefix( "6", orientation ) )
|
if( vips_isprefix( "6", orientation ) )
|
||||||
angle = VIPS_ANGLE_90;
|
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 );
|
return( angle );
|
||||||
|
Loading…
Reference in New Issue
Block a user