在使用Accord.Video.VFW.dll将位图转换为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