WPF: How to efficiently update an Image 30 times per second

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-03-16T14:12:43Z Indexed on 2010/03/16 14:16 UTC
Read the original article Hit count: 250

Filed under:
|
|

Hello, I'm writing a WPF application that uses a component, and this component returns a pointer (IntPtr) to pixels of a bitmap (stride * height). I know in advance that the bitmap is a 24bits rgb, its width and height.

Updating the Image control with these bitmaps makes up a video to the user, but I'm not sure what's the most efficient way to do that, most of the time the CPU usage goes to 75%+ and memory changing from 40mb to 500mb and the nI think GC starts to work and then it drops again to 40mm. The app starts to not be responsive.

What shoud I do?

thanks!

© Stack Overflow or respective owner

Related posts about wpf

Related posts about bitmap