|
-
Jan 10th, 2012, 02:49 PM
#8
Re: [VB6] - DIB's - Tiles an image
The optimized routine uses BitBlt, but just uses it less often and efficiency is gained by taking the time to calculate maximum number of pixels to copy in one BitBlt call. The easy, less efficient method is to simply BitBlt one tile at a time. Look at this for example:
Width of picturebox is 64 tiles wide.
1) Not optimized: Copy 1 tile, 64 times
2) Optimized: The BitBlt is copying from the destination DC, what has already been painted
Copy 1 tile, then 2 tiles, then 4 tiles, then 8 tiles, then 16 tiles & finally 32 tiles. Only 6 BitBlt calls made
Here's a visual of what I'm trying to explain regarding the 6 BitBlt calls
Last edited by LaVolpe; Jan 10th, 2012 at 03:07 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|