简体   繁体   English

如何从Fresco SimpleDraweeView获取gif?

[英]How to fetch gif from Fresco SimpleDraweeView?

I'm using Fresco to show gif, I want to save the same gif on sd card. 我正在使用壁画显示gif,我想在sd卡上保存相同的gif。 As gif must already be in memory, is there any way to get that gif from memory to sd card instead of downloading again from server. 由于gif必须已经在内存中,因此有什么方法可以将该gif从内存中获取到SD卡中,而不是从服务器中再次下载。

I have already tried to get it directly from pipeline but no luck in case of gif, it's working only with images. 我已经尝试过直接从管道中获取它但是如果使用gif则没有运气,它仅适用于图像。

Did you also try using imagePipeline.fetchEncodedImage in ImagePipeline? 你也可以尝试使用imagePipeline.fetchEncodedImage在ImagePipeline? FetchDecodedImage will not work for gifs but fetchEncodedImage should give you the raw image from disk cache. FetchDecodedImage不适用于gif,但fetchEncodedImage应该为您提供磁盘缓存中的原始图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM