如何加快android系统中连续图像的显示 [英] how to speed up display for continous images in android
问题描述
目前,我正尝试从另一个移动接收和显示视图的应用程序。当收到的意见,我将其转换为位图,并使用ImageView的像显示它们
imageView.setImagebitmap(XXX)。然而,我发现了API的表现并不好。
Currently, I am trying an application for receive and display views from another mobile. When views received, I will convert it as a bitmap, and use ImageView to display them like imageView.setImagebitmap(xxx). However, I found the API performance is not good.
当我需要显示的图像连续(不是视频),有没有加快的显示方式?
As I need display the continous images (not a video), is there any method to speed up the display?
感谢您
推荐答案
您应该考虑使用的 SurfaceView 代替的ImageView
。每次通话时间 ImageView.setImageBitmap
创建和查看自己新的 BitmapDrawable
实例无效,所以这是相当沉重的方式快速切换图像。
You should consider using SurfaceView instead of ImageView
. Every time you call ImageView.setImageBitmap
new BitmapDrawable
instance is created and view itself is invalidated so this is quite heavy way for switching images rapidly.
此外,如果你需要绘制您可以通过禁用<一个显着增加帧率之前扩展位图href=\"http://developer.android.com/reference/android/graphics/Paint.html#setFilterBitmap%28boolean%29\"相对=nofollow>位图筛选。
Also if you need to scale bitmap before drawing you can dramatically increase framerate by disabling bitmap filtering.
这篇关于如何加快android系统中连续图像的显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!