Advertisement Jump to content


This topic is now archived and is closed to further replies.


Manually bltting Bitmaps to DD Surfaces

This topic is 6193 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First forgive me if this question has been answered before but i could not find one. I''m having difficulty in copying a DIB to DirectDraw surface by locking and manually copying the bits( for a DirectShow rendering filter). This works well on almost all bitmaps except when the bitmap is oddly size (say 720 x 480) and the dib is bottom up. It only happens on a few video cards, and only when the bitmap is bottom-up. When its bottom-up (almost always) I.... BytePointerToSurface += Width * Height * BytesPerPixel - Pitch; Getting me to the beginning of the last scan line. And Pitch = -Pitch; This should work, should it not? I''ve been given suggestions about the bitmap being a multiple of 4 but its always a multiple of 4. What happens when the problem arises is the bitmap is off set( half on the left side, half on the right side with a break in the middle of the screen). I''m quite lost as to what would cause this. Dysprosium Software Bobby Ward - COM Guru in training

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!