Archived

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

best way to work with fast picture modification?

This topic is 5149 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

Dib sections should do what you're wanting.
I'm not sure what language you're working in, but the concepts should be similar in any.
If you're using vb, check here
if not, still check over there.

I assume you aren't doing anything that openGL or direct3d would help out in (or you just don't want to use them.)

-Michael

[edited by - thr33d on November 7, 2003 5:00:59 PM]

Share this post


Link to post
Share on other sites
One method is to make a DDB back buffer, and use the SetBitmapBits function to fill it from an array of pixels. The actual byte order/accuracy depends on the window you are outputing/desktop bitdepth/graphics card. You can do some silly little tricks to figure this out, by drawing a test array of colors in the array, and looking which looks like it should for the appropriate bit depth/byte order. in a 640x480 window.. this runs at about 120fps... giving you about 1/60 secs to do what you want to it, to get 40fps final performance (on my 1800 XP). I got a window full of noise going at 80fps (ie writing to every pixel on screen) so it should certinly be possibly. You could opt for a DIB and do the same, but this will almost certainly be slower (but a lot easier).

Share this post


Link to post
Share on other sites