yuyashuai / FrameAnimation

High-Performance Frame Animation Library For Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

decodeStream很慢.

nickeyfff opened this issue · comments

commented

decodeStream很慢.每张都在40到60ms 导致播放帧动画的时候报错

get bitmap in position: 5 is null ,animation was forced to stop

动画线程就被关掉了.

有什么解决办法吗?

单张图片多大?io速度是个物理瓶颈,就算多线程io也不能提升,只能压缩图片质量。可以尝试修改分辨率、色位压缩图片,去TinyPNG处理下。

commented

单张图片30来K, png, 带透明的图. 分辨为1050*1050. 可能比较大了

但IO应该不会大.

我加了个并发的线程池来处理图片的的decode. 效果还不错