使用Accord.Video.VFW.dll将Bitmaps转换为AVi时,我使用以下代码:

AVIWriter writer = new AVIWriter();
// create new AVI file and open it
writer.Open( "test.avi", 320, 240 );
// create frame image
Bitmap image = new Bitmap( 320, 240 );

for ( int i = 0; i < 240; i++ )
{
    // update image
    image.SetPixel( i, i, Color.Red );
    // add the image as a new frame of video file
    writer.AddFrame( image );
}
writer.Close( );

排队

writer.AddFrame( image );

总是得到错误:

Exception thrown: 'System.OverflowException' in Accord.Video.VFW.dll