Specifies the possible orientations of a UIImage.
Questions tagged [uiimageorientation]
57 questions
116
votes
19 answers
How to flip UIImage horizontally?
How to flip the UIImage horizontally, I found UIImageOrientationUpMirrored enumeration value in the UIImage class reference, how to make use of this property to flip UIImage.

pradeepa
- 4,104
- 5
- 31
- 41
32
votes
9 answers
Using UIImagePickerController in landscape orientation
I am creating an app which is in landscape mode and I am using UIImagePickerController to take photos using iPhone camera in it and I want to create it in landscape mode too.
But as the Apple documention suggests UIImagePickerController does not…

Paras Gorasiya
- 1,295
- 2
- 13
- 33
6
votes
3 answers
UIImageOrientation incorrect for left/right from loaded UIImage?
I am loading JPGs that are flagged with arbitrary EXIF orientation data (one of 8 orientations). I downloaded the eight sample image files from here (linked from this blog post).
Image 8 represents EXIF tag 8, which is a 90 degree clockwise…

Ben Zotto
- 70,108
- 23
- 141
- 204
5
votes
2 answers
iOS UIImage: set image orientation without rotating the image itself
I am using AVCapture+camera portrait mode to capture an image. when I display the captured image, it is fine--looks fine. But when I convert to jpeg representation and then convert to base64 string to server and server stored it, it is "rotated"…

Junchao Gu
- 1,815
- 6
- 27
- 43
4
votes
1 answer
confused by the UIImageOrientation of portrait/landscape mode photo
I take two photos using the ios`s system camera,which one is in portrait mode and another is in landscape mode, then I use imagePicker to pick them out in my app like this:
-(void) imagePickerController:(UIImagePickerController *)picker…

wdanxna
- 10,699
- 2
- 23
- 24
4
votes
2 answers
Transforming CGPoint results returned from CIFaceFeature
I am trying to figure out how to transform the CGPoint results returned from CIFaceFeature in order to draw with them in a CALayer. Previously I had normalized my image to have 0 rotation in order to make things easier but that causes problems for…

spring
- 18,009
- 15
- 80
- 160
3
votes
1 answer
Problems Determining Correct Orientation Using ALAssetOrientation and UIImageOrientation
I'm having problems orienting images properly on the iPhone. I'm accessing the images using the AssetLibrary classes.
All, I want to do is properly orient the images for display, unfortunately for some images that are taken in portrait mode, they…

willmapp
- 61
- 1
- 3
3
votes
1 answer
After getting image from UIImagePickerController, UIImageView rotates image for iPhone 5
I am using UIImagePickerController to capture image using camera. Supported orientation for my app is Portrait. I am seeing strange behavior for iPhone 5. I am using Xcode 7 and swift 2.0. iPhone 5 OS version is 8.4. Deployment Target is 8.0 for my…

Naren
- 1,504
- 16
- 19
3
votes
1 answer
Rotating portrait UIImage that somehow has a UIImageOrientationRight orientation
Hi everyone,
I'm having an issue rotating a portrait UIImage (i.e. WIDTH < HEIGHT) that somehow has an orientation equal to UIImageOrientationRight. I'm not sure how this comes to be but it happens with a few images in my library captured with an…

sunshineDev
- 323
- 3
- 10
3
votes
3 answers
Correcting orientation of UIImage stored in document with lost EXIF tags
I have encountered a similar problem to others on SO regarding the orientation of UIImages taken using the iPad camera. Essentially, I am taking a UIImage using the camera on the iPad. When I then display it, it has rotated through 90 degrees.
From…

Ben Thompson
- 4,743
- 7
- 35
- 52
2
votes
2 answers
How to load an image and rotate it according to it's orientation exif data and save it with UIImageOrientationUp exif data
How to load an image and rotate it according to it's orientation exif data and save it with UIImageOrientationUp exif data (or without any orientation exif data) so that software that don't handle exif orientation data will show correctly the image…

zeus
- 12,173
- 9
- 63
- 184
1
vote
1 answer
Using UIImageOrientation to Save UIImage Correctly in Landscape Mode
I am receiving my UIImage's from AVCaptureSession and setting them into UIImageView's. The portrait mode sets images with correct orientation but once I use landscape mode the images are set rotated 90 degrees clockwise.
I did a little research and…

Vad
- 3,658
- 8
- 46
- 81
1
vote
1 answer
Orientation and origin with CoreGraphics and CGImageCreateWithImageInRect
I am using CGImageCreateWithImageInRect to crop an image take with the camera. The orientation of the iPhone (and the photo image) is Portrait and my understanding is that CGImageCreateWithImageInRect expects the origin to be in the lower left…

mahboudz
- 39,196
- 16
- 97
- 124
1
vote
1 answer
Swift: UIImage orientation problem when applying filter in swift
I want to convert an image to grayscale by CIPhotoEffectNoir, but after using it, the image rotates. I searched a lot but the answers can not solve my problem.
This is my code:
func grayscale(image: UIImage) -> UIImage? {
let context =…
user13622589
1
vote
1 answer
Does auto-orient in Imagemagick rotate image pixels?
I want to know what does following Imagemagick command exactly does:
convert input.jpg -auto-orient out.jpg
Does it just read and update exif ?
Or does it also rotate the pixels present in the image?

Manish Gautam
- 69
- 7