更快的背景图片 [英] faster background image

查看:91
本文介绍了更快的背景图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将Visual Studio 2008设计软件用于嵌入式Windows XP计算机.开发团队希望对背景图像使用定制的jpeg或bmp.可以将其作为资源文件添加到Vistual Studio中的backgroundImage下.我们使用的屏幕分辨率为640x480.

问题在于屏幕更新的用户体验太慢.当然,如果使用backColor,它将更快.除了硬件更新之外,没有人知道一种加快此速度的方法吗?

We are using Visual Studio 2008 design software for an embedded Windows XP computer. The development team is wanting to use a custome jpeg or bmp for a background image. This can be added as a resource file under backgroundImage in Vistual Studio. The screen resolution we are using is 640x480.

The problem is that the user experience for the screen update is too slow. If the backColor is used it is much faster, of course. Besides a hardware update does anybody know of a way to speed this up?

推荐答案

没有代码很难说.问题可能是您需要更新屏幕,而不是仅更新屏幕的一部分,而是更新所有屏幕.为此,您可以查看Control.Invalidate.
http://msdn.microsoft. com/en-us/library/system.windows.forms.control.invalidate%28v = vs.71%29.aspx [
It''s hard to say without code. An issue could be that you need the screen to update and instead of updating only a part of the screen you update all of it. For this you could look into Control.Invalidate.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invalidate%28v=vs.71%29.aspx[^]

Another big problem might be that you load the image from resource to display it and then discard it again immediately, meaning it would need to reload every time. Instead you could load it when the application starts, keep it in memory and use that.

Good luck!


由于低端计算机可能会由于刷新图形而出现显示故障,因此您应该选择部分图形,而不是刷新整个窗口.

无论算法多么出色,一次绘制整个窗口都无法避免此问题.
Since the low-end computer can present display glitches due to the drawing refresh, you should opt for a partial drawing instead of refreshing the entire window.

Painting the entire window once can never prevent from this problem no matter how good is the algorithm.


加快速度的唯一方法是升级硬件或不使用硬件.图片作为背景.
The only way to speed it up is to either upgrade the hardware or don''t use an image as a background.


这篇关于更快的背景图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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