开发者

Turning system.drawing.drawing2d.graphics into .avi file?

I have a .NET program that does some displaying by drawing on a system.drawing.drawing2d.g开发者_Python百科raphics object. I'd like to be able to turn each "frame" drawn into a frame in an .avi file.

Are there AVI classes in .NET? Some simple way to get the bitmap that must underlie the graphics object?

Thanks in advance.


Should be easy enough to draw a bitmap in the same way that you are drawing on the graphics surface at the moment; an example of creating a graphics object from a bitmap can be found over on MSDN. You could draw each bitmap image, display it on the graphics surface then write the bitmap to a file for later use.

A quick search also yielded this codeproject tutorial which has an example of generating an AVI from a set of bitmaps in C#.

Another example of this can be found in the AVIWriter class.

Either of these examples could be modified to read your list of bitmaps generated in the drawing phase of your code and then generate the AVI.

Hope this helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜