【问题标题】:display and create gif image on iPhone在 iPhone 上显示和创建 gif 图像
【发布时间】:2012-08-28 18:48:28
【问题描述】:

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

当我在谷歌上搜索 Facebook 和 Apple 时,它​​会显示 2 年前的答案。可能现在苹果和Facebook改变了他们的政策,是否可以在iPhone App上创建GIF图像并发布到Facebook上?

根据这个堆栈溢出问题here 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];

【问题讨论】:

标签: iphone ios gif


【解决方案1】:

我已经能够使用 ImageMagick 在 iOS 上创建动画 gif。那里有很多教程。这里是one。这里是ImageMagick compiled for iOS

我无法解决(由于时间原因)是如何通过使用调色图像和其他 gif 压缩方法来获得压缩的好处。这将是值得研究的事情,因为我发现我能够创建的图像非常大。

【讨论】:

  • 链接已过期 :(
猜你喜欢
  • 2020-05-29
  • 1970-01-01
  • 1970-01-01
  • 2010-11-05
  • 1970-01-01
  • 2017-11-29
  • 2012-12-13
  • 2017-02-13
  • 2022-01-18
相关资源
最近更新 更多