Results 1 to 40 of 44

Thread: [RESOLVED] [VB6] - DIB's - Tiles an image

Threaded View

  1. #8
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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
    Name:  pwr2Blt.PNG
Views: 940
Size:  900 Bytes
    Last edited by LaVolpe; Jan 10th, 2012 at 03:07 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width