Comments (2)
恐怕不太容易。
首先非常感觉作者提供了这个源码,最近我也花了些时间来��
�理,并解决了一些问题,但是oome的问题仍然没有根本解决。
现在只有强制结束解析了。
附件为修改的代码。
gf2=(GifView2) findViewById(R.id.gif2);
gf2.setGifImageType(GifView2.GifImageType.ANIMATION);
try {
File file=new File("/sdcard/test.gif");
FileInputStream fis=null;
fis=new FileInputStream(file);
System.out.println("fis:"+fis.available());
gf2.setGifImage(fis);
/*FileInputStream fileInputStream=new FileInputStream(file);
byte[] bytes=new byte[fileInputStream.available()];
fileInputStream.read(bytes);
gf2.setGifImage(bytes);*/
gf2.setOnClickListener(this);
} catch (IOException e) {
e.printStackTrace();
}测试代码。
动态的解析,播放个人认为不太好,太耗内存了。
Original comment by [email protected]
on 13 Dec 2011 at 10:11
Attachments:
from gifview.
理论上OOM是无解的。
其实我曾经想把解码后的图片保持成文件,以此来解决OOM,��
�实际效果太差了。在代码中你可以看到这部分代码,虽然我�
��这个接口注释了,但代码没有删除。
Original comment by [email protected]
on 25 Apr 2012 at 8:52
from gifview.
Related Issues (20)
- 图片解析线程与onMeasure函数之间的先后顺序没法预测,导致无法显示完整的gif图片 HOT 3
- 非常感谢你的项目
- 我遇到的一些问题 HOT 1
- 缓存bitmap的时候读取失败 HOT 1
- gif图片无法更新导致直接崩溃,调用destroy函数后貌似线程无法关闭 HOT 2
- 你好,我想从sd卡里加载gif进来 如果已知了路径 该如何加载呢? HOT 1
- 贡献一份力量 GiFDrawable
- java.lang.OutOfMemoryError: bitmap size exceeds VM budget HOT 1
- 代码运行的时候抛错 HOT 1
- gifview无法支持类似gridview的复用逻辑,会有线程之间的冲突
- 关于设置缓存图片setCahceImage()的问题 HOT 1
- gif颜色设置问题 HOT 1
- 请问有没有办法让GIF只播放一次 HOT 1
- 怎么控制gif图片的帧的播放速度 HOT 3
- OOM解决
- 启动新Activity返回时报 OpenGLRenderer Cannot generate texture from bitmap
- GifDecoder不支持透明度
- 导入jar包后项目报红叹号
- 网络gif图片加载
- GifView demo : Animation is paused, and can not resume. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gifview.