How to save a GIF on the iPhone?

时光怂恿深爱的人放手 提交于 2019-11-28 06:18:11

问题


how can I save a GIF on the iPhone? The SDK includes only UIImageJPEGRepresentation and UIImagePNGRepresentation but nothing for GIFs or other image formats, is there a way to convert a UIImage to a GIF and save it?

GM


回答1:


This is a library I wrote for encoding GIF images on the iPhone, if anyone reading this is interested:

http://jitsik.com/wordpress/?p=208




回答2:


You can't without a third party GIF library. The question is why do you need it to be GIF? PNG provides all that you might need and it is well supported. If you are trying to do animation, look at UIImageView's -animationImages property.



来源:https://stackoverflow.com/questions/1851103/how-to-save-a-gif-on-the-iphone

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