帧动画的android问题 [英] Frame animation problems android

查看:167
本文介绍了帧动画的android问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android的表现卡住帧动画。我的问题是,我有动画36图像。最小的图像尺寸和最大的(最后一帧)69 kb的是526KB。共有11MB的。我知道它的疯狂,但我需要做的。见下面的图片。该应用已经取得了iphone,我必须将它移植到Android。
要求:

I am stuck showing frame animation in android. My problem is that I have to animate 36 images. The smallest image is 69 kb in size and the biggest(last frame) is 526kb. A total of 11mb. I know its insane but I need to do it. See images below. The app is already made for iphone and I have to port it to android. Requirements:


  1. 流畅的动画

  2. 无帧丢失

  3. 与iPhone一致

我尝试的解决方案是:


  1. 将在XML文件中提供AnimationDrawable。问题:开始时间为近6 -12秒。图像丢失帧,从而锯齿经验。

  2. 的处理程序内更改ImageView的位图。问题:帧丢失和Out的内存

  3. 创建一个自定义的ImageView类。定义一个方法showAnimation()和里面更新位图和无效()单元1的最后一帧的图。问题:无法适应我的要求。这是迄今为止得到最好的结果,但还不到一半的要求。

我在OpenGL和gamedevelopment一个小白。我无法找到任何替代我的问题。请帮助。

I am a noob in opengl and gamedevelopment. I am unable to find any alternative to my problem. Please help.

最小图像:

Smallest image:

最后一张图像:

Last image:

推荐答案

我可以想像你的目标at.I效果猜这样做会需要不同的图像推到同一ImageView的,增量的帧速率|

I can visualize the effect you are aiming at.I guess doing this will require pushing in different images onto the same imageView, with incremental frame rate.|

精度将取决于你有图像的数量。图像更精细的更大的数目将是precision。

The accuracy will depend on the number of images you have. Greater the number of images finer will be the precision.

此外,你需要实现增量帧速率。因此,它给人一种流畅的感觉。

Also you need to implement incremental frame rate. So that it gives a smoother feel.

这样做应该用一个简单的循环改变ImageView的控制器的图像资源成为可能。必须有两个迭代之间的滞后,这种滞后实际上将帧速率

Doing this should be possible using a simple loop to change the image resource of the imageView Controller. There must be lag between two iterations, this lag will actually be the frame rate.

我想这可以给满意的结果。

I think this can give satisfactory results.

去对OpenGL,但是,你并不需要所有这些图像。它将只需要将动画和重复以创建最终图像卡的一个图像。但是,这是一个复杂的任务(我认为),所以如果你正赶上一些死线,你必须去一个非openGL的解决方案,如1号之一,我建议。

Going for openGL, however, you will not need all these images. It will just require one image of the card that will be animated and duplicated to create the final image. This however is a complex piece of task(I think) so if you are catching some dead lines, you must go for a non-openGL solution like the 1st one, I have suggested.

这篇关于帧动画的android问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆