N
N
nikesport2014-12-16 14:55:03
ASP.NET
nikesport, 2014-12-16 14:55:03

What is wrong with c#?

private void Form1_Load(object sender, EventArgs e)
{
AVIWriter writer;
writer = new AVIWriter();
writer.FrameRate = 1;
writer.Quality = 1;
writer.Open(@"C:\Users\User2\Videos\test.avi", 320, 240);
System.Drawing.Bitmap frame = new System.Drawing.Bitmap(320, 240);
for (int i = 0; i < 320; i++)
{
writer.AddFrame(frame);
}
}
An unhandled exception of type 'System.ArgumentException' in AForge.Video.VFW.dll
Additional information: Bitmap size must be of the same as video size, which was specified on opening video file.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Elizariev, 2014-12-17
@effetto

The mistake is trying to start programming without a basic knowledge of English. If you plan to connect your life with development, learn English. Otherwise, order work from a professional. A machine translator will help you learn English , to which you can feed hitherto incomprehensible error messages.

V
Vitaly Pukhov, 2014-12-17
@Neuroware

Of course, you do not need to read the text of the error, in the error it is written in Russian and white that the size of the picture must match the size of the frame in the video.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question