Save UIImage, Load it in Wrong Orientation

后端 未结 5 1960
无人共我
无人共我 2020-12-13 04:03

I am using the following code to save and load images that I pick from either the library or take using the camera:

//saving an image
- (void)saveImage:(UIIm         


        
5条回答
  •  执笔经年
    2020-12-13 04:33

    The root cause is PNG format doesn't have image orientation information, but JPEG format does. So the easiest way to solve this problem is saving your file in JPEG format using UIImageJPEGRepresentation()

提交回复
热议问题