Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

How to accelerate the display speed

Hi,
    I will display a large bitmap in my view client.
    And I have to process its content and change it      very frequently,how can  I accelerate the display    speed.Is palette useful to that( in 24 bit display
   mode)
0
XiaoChen
Asked:
XiaoChen
1 Solution
 
arnondCommented:
the best way is to have a memory DC (or CBitmap) and do all the updates in the memory and only then BitBlt it to your screen DC.
0
 
jstolanCommented:
This is a really huge question and the answer is "It depends".  There are several different cases:

1.  Palette animation can be really fast if you can design your bitmap so that merely changing colors will do what you need.  For example if your image is of a street scene at night, you can animate the buildings by changing certain colors from black to white, giving the illusion of lights switching on and off.

2.  Arnonds suggestion for doing the updates in memory and BitBlting to the screen is a good one.  It will work for a lot of cases.  However, if your changing from one large bitmap to another in one operation, it won't be any faster than just blting the new bitmap over the old.  The procedure works best when there are several small changes being made to the bitmap at the same time.  For example, if you need to animate a rotation of an object, there will be a lot of small recalculations that go into the display.  This process will make the transition appear to be nearly instantaneous.  If your using the generic windows bitblt functions however, large blts will still appear very flickery and jerky.

3.  The best approach is to use DirectX.  This library has special functions to solve these problems.  But of course there is that learning curve!

Good luck
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now