小编dev*_*234的帖子

使用 Accord.Video.VFW.dll 将位图转换为 AVI 时出错

在使用 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( );
Run Code Online (Sandbox Code Playgroud)

排队

writer.AddFrame( image );
Run Code Online (Sandbox Code Playgroud)

总是出现错误:

Exception thrown: 'System.OverflowException' …
Run Code Online (Sandbox Code Playgroud)

bitmap avi accord.net

5
推荐指数
1
解决办法
352
查看次数

标签 统计

accord.net ×1

avi ×1

bitmap ×1