A jpg is rendered upside down on my mac but correctly in a safari browser on the same mac. What is the orientation data that is not correctly being read? Is it in the EXIF?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Here's how to display it with the correct orientation
if (image.imageOrientation != UIImageOrientationUp)
{
image = [UIImage
imageWithCGImage: image.CGImage
scale: 1
orientation: UIImageOrientationUp];
}
based on an answer by ravin Save UIImage, Load it in Wrong Orientation