Why .jpeg file save via writetofile using UIImageJPEGRepresentation method have large size then UIImageWriteToSavedPhotosAlbum in ios

不羁岁月 提交于 2019-12-04 05:21:33

You are setting the quality to be really high (1.0), I guess 0.6 or 0.7 would be more than enough for jpeg files as I read somewhere.

NSData *dataForJPEGFile = UIImageJPEGRepresentation(mimage, 0.65);

Maybe you can find the appropriate quality depending on your app use, for me sometimes 0.5 is more than enough.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!