Skip to content

Instantly share code, notes, and snippets.

@jrturton
Created February 27, 2014 11:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrturton/9248517 to your computer and use it in GitHub Desktop.
Save jrturton/9248517 to your computer and use it in GitHub Desktop.
Converting UImageOrientation to TIFF orientation values
switch (originalOrientation)
{
case UIImageOrientationUp:
orientationValue = @1;
break;
case UIImageOrientationDown:
orientationValue = @3;
break;
case UIImageOrientationLeft:
orientationValue = @8;
break;
case UIImageOrientationRight:
orientationValue = @6;
break;
case UIImageOrientationUpMirrored:
orientationValue = @2;
break;
case UIImageOrientationDownMirrored:
orientationValue = @4;
break;
case UIImageOrientationLeftMirrored:
orientationValue = @5;
break;
case UIImageOrientationRightMirrored:
orientationValue = @7;
break;
}
@FlexMonkey
Copy link

Thanks a million for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment