Results 1 to 4 of 4

Thread: StretchBlt/PaintPicture...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Hiyas,

    Here's what I'm doing. I open a picture up into a hidden picturebox, called TileSource. The image is 640 * 480 pixels. It's 20 tiles across and 15 down (32x32 pixel tiles).

    I want to shrink the entire image 1/4 the size, so the 32x32 pixel tiles become 24x24. Which is the best method - StretchBlt or PaintPicture, and how would I do this? (I only really know BitBlt)

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Hi there,

    I'd just shrink the image in a graphics program.
    Image manipulation on the fly is quite processor intensive and a nono (imho) for games.

    - jamie.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Actually it's a game editor, so speed doesn't matter. =) (and shrinking before load is out of the question too)

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    You may want to check out :
    http://www.vbexplorer.com/game_tutorials.asp

    Specifically 'Animation + Drawing' > 'Drawing + Animation 2'

    That has some stuff on stretchblt

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

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