使用ios将图像转换为gif [英] Convert Images to gif using ios

查看:110
本文介绍了使用ios将图像转换为gif的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用IOS Xcode 4.5以编程格式转换10个UIImages并将其保存在图库中,但我没有运气,我甚至在stackoverflow上尝试了一个问题
通过iOS创建和导出动画gif?我没有明白这是什么使用__bridge id之类的变量以及如何将这些图像分配给方法请帮助....

I am trying to convert 10 UIImages in .gif format programatically using IOS Xcode 4.5 and save it in gallery, but am having no luck I even tried a question at stackoverflow Create and and export an animated gif via iOS? I am not getting the point what are the variables like __bridge id used and how can i assign these images to the method please help ....

推荐答案

首先你应该在Apple文档中检查您的问题。一切都在那里。你需要的是研究与发展读即可。

First of all you should check for your problem in Apple Documentation. Everything is given there. What you need is to Research & Read.

您应该尝试 ImageIO框架。它可以将 .png文件转换为 CGImageRef 对象,然后将 CGImageRefs 导出为 .gif文件

You should try the ImageIO framework. It can convert .png files into CGImageRef objects and then export the CGImageRefs to .gif files.

将图像保存到照片库: UIImageWriteToSavedPhotosAlbum(imageToSave,nil,nil,nil);
还记录在 UIKit

To save Images to Photo Library :UIImageWriteToSavedPhotosAlbum(imageToSave, nil, nil, nil); Also Documented in UIKit.

这篇关于使用ios将图像转换为gif的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆