我想从UIImagePickerController加载图像,然后将选定的照片保存到我的应用程序的文档目录。 UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *data1 = UIImagePNGRepresentation(image); NSString *fileName = "1.png"; NSString *path = //get Document path, then add fileName BOOL succ = [data1 writeToFile:path atomically:YES]; 但是在将图像保存到我的文档后,我发现图像旋转了90度,然后将UIImagePNGRepresentation方法更改为UIImageJPEGRepresentation,这一次很好,谁知道这是什么问题?