orientation of image in imageview is shifted 90 left in device
i am selecting i开发者_开发百科mage from imagepickercontroller and diplaying in an imageview.however for images taken from the camera ,they always appear 90 left in the device.for the images i take in the simulator they have the correct orientation.how to correct this.should i specify any orientation for images
I ran into the same issue myself. The way I solved it was to check the images orientation and then rotate it if it was supposed to be landscape.
The code I used was:
float orientation = [[myPhotoAsset valueForProperty:@"ALAssetPropertyOrientation"] floatValue];
if (orientation == 3)
photo = [self CGImageRotatedByAngle:photo angle:-90];
Cheers
I had the same issue but finally I solved it with the following code:
UIImage*Image=[UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]];
精彩评论