iOS 4 Image Oriented Incorrectly When Posted To Server
问题 I am a relatively new iOS developer. I am attempting to build an app that uploads images to a server. However, when I get the image with metadata, the orientation is always off. Here is the code I am using: - (void)getJPEGFromAssetForURL:(NSURL *)url { ALAssetsLibrary* assetslibrary = [[ALAssetsLibrary alloc] init]; [assetslibrary assetForURL:url resultBlock: ^(ALAsset *myasset) { self.rep = [myasset defaultRepresentation]; NSLog(@"getJPEGFromAssetForURL: default asset representation for %@: