iPhone iOS saving data obtained from UIImageJPEGRepresentation() fails second time: ImageIO: CGImageRead_mapData 'open' failed

前端 未结 1 1492
渐次进展
渐次进展 2021-02-08 10:53

I\'m running into a weird issue with my UIImage manipulation.

I\'m doing a dropbox sync, and have to store my images as local files. To do so, I save them using the

相关标签:
1条回答
  • 2021-02-08 11:09

    I've run into something similar before. It looked like imageWithContentsOfFile kept the file open as long as the UIImage it was used to create was still alive. At the time, I had gotten around the problem by reading the file into a NSData and then creating the UIImage from the NSData instead of the file directly.

    0 讨论(0)
提交回复
热议问题