Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于webp的转码问题 #44

Open
FutureChen opened this issue Jul 13, 2016 · 2 comments
Open

关于webp的转码问题 #44

FutureChen opened this issue Jul 13, 2016 · 2 comments
Labels

Comments

@FutureChen
Copy link

FutureChen commented Jul 13, 2016

  由于我们项目中强制使用了FLAnimatedImage,所以我需要在下载图片完成以后,将图片转成NSData赋值给FLA在ImageView上显示出来。如下:

FLAnimatedImage *flImage = [FLAnimatedImage animatedImageWithGIFData:yyImage.animatedImageData];
self.animatedImage = flImage;
普通的gif这样操作完全没问题

这是我的图片地址: http://7xv1nd.com2.z0.glb.qiniucdn.com/942f4241967a4ec4a8567d6701c7a52f.gif?imageView2/2/h/375/w/750/format/webp

这是一张用七牛获取的webp 动图,我希望转成GIF的NSData复制给FLA,然而行不通,求大神解救

               YYImageDecoder *decoder=  [yyImage valueForKey:@"_decoder"];
                NSData *gifData=  [YYImageEncoder encodeImageWithDecoder:decoder type:YYImageTypeGIF quality:1.0];
                FLAnimatedImage *flImage = [FLAnimatedImage animatedImageWithGIFData:gifData];
                self.animatedImage = flImage;
@FutureChen
Copy link
Author

PS :图片地址可以用谷歌浏览器打开

@ibireme
Copy link
Owner

ibireme commented Jul 13, 2016

检查了下,是个 Bug,通过内部 addImageWithData 来编码多帧 GIF 时失败。

Fixed: dfe43e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants