在iPhone上显示并创建gif图像(display and create gif image on iPhone)

编程入门 行业动态 更新时间:2024-10-25 00:36:24
在iPhone上显示并创建gif图像(display and create gif image on iPhone)

我正在谷歌上搜索过去几个小时的答案。 我知道Apple和Facebook不支持gif图像,我想在iPhone应用程序中显示和创建gif图像,我找到了制作图像序列和动画的替代解决方案。 我想从这些图像创建GIF图像并在Facebook墙上发布。

当我在Google上搜索Facebook和Apple时,它显示了2年的答案。 可能现在苹果和Facebook改变了他们的政策,这可能在iPhone App上创建GIF图像并在Facebook上发布吗?

根据这个堆栈溢出问题这里 Apple支持gif图像吗?

UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; animatedImageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"image1.gif"], [UIImage imageNamed:@"image2.gif"], [UIImage imageNamed:@"image3.gif"], [UIImage imageNamed:@"image4.gif"], nil]; animatedImageView.animationDuration = 1.0f; animatedImageView.animationRepeatCount = 0; [animatedImageView startAnimating]; [self.view addSubview: animatedImageView];

I am googling for the answer from last few hours. I know that Apple and Facebook do not support gif images, I wants to display and create gif image in an iPhone App, I find the alternate solution that make the image sequence and give animation. I wants to create the GIF image from these images and post on Facebook wall.

When I was googling about Facebook and Apple, it shows 2 years old answers. May be now apple and Facebook changed their policies, Is this possible to create GIF image on iPhone App and post to it on Facebook?

According to this stack overflow question here does Apple support gif images?

UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; animatedImageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"image1.gif"], [UIImage imageNamed:@"image2.gif"], [UIImage imageNamed:@"image3.gif"], [UIImage imageNamed:@"image4.gif"], nil]; animatedImageView.animationDuration = 1.0f; animatedImageView.animationRepeatCount = 0; [animatedImageView startAnimating]; [self.view addSubview: animatedImageView];

最满意答案

我已经能够使用ImageMagick在iOS上创建GIF动画。 那里有很多教程。 这是一个 。 这里是为iOS编译的ImageMagick 。

我无法理解(由于时间)是如何通过使用调色板图像和其他gif压缩方法获得压缩的好处。 当我发现我能够创建的图像非常大时,需要考虑这个问题。

I've been able to create animated gifs on iOS using ImageMagick. There are a number of tutorials out there. Here is one. And here is ImageMagick compiled for iOS.

What I wasn't able to sort out (due to time) was how to get the benefit of compression by using palettized images and other gif compression methods. That wold be something to look into as I found the images I was able to create were quite large.

更多推荐

本文发布于:2023-08-04 07:58:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1412597.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   gif   iPhone   image   create

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!