Click here to Skip to main content
15,887,477 members
Home / Discussions / C#
   

C#

 
AnswerRe: about the usinhg Visual Studio 2010 beta 1 Pin
Vikram A Punathambekar1-Jul-09 19:55
Vikram A Punathambekar1-Jul-09 19:55 
AnswerRe: about abusing Visual Studio 2010 beta 1 Pin
OriginalGriff1-Jul-09 23:28
mveOriginalGriff1-Jul-09 23:28 
QuestionDatalist to pdf [modified] Pin
ferronrsmith1-Jul-09 10:12
ferronrsmith1-Jul-09 10:12 
AnswerRe: Datalist to pdf Pin
I Believe In GOD1-Jul-09 11:00
I Believe In GOD1-Jul-09 11:00 
GeneralRe: Datalist to pdf Pin
ferronrsmith1-Jul-09 12:26
ferronrsmith1-Jul-09 12:26 
QuestionDocument Viewer control Pin
CoLeichty1-Jul-09 8:26
CoLeichty1-Jul-09 8:26 
AnswerRe: Document Viewer control Pin
Luc Pattyn1-Jul-09 9:13
sitebuilderLuc Pattyn1-Jul-09 9:13 
QuestionAForge.net writer.Open problem Pin
tvbarnard1-Jul-09 7:59
tvbarnard1-Jul-09 7:59 
Good day

I'm having a problem with the writer.Open() method in the AForge library.

I've tried running Andrew Kirillov's code snippet (below) from his "Motion Detection Algorithms" article, on how to save video to a file, but when I attempt recording the program it jumps right into the exception (since "writer.Open()" isn't working).


SaveFileDialog sfd = new SaveFileDialog( );
if ( sfd.ShowDialog( ) == DialogResult.OK )
{
    AVIWriter writer = new AVIWriter( "wmv3" );
    try
    {
        writer.Open( sfd.FileName, 320, 240 );
        Bitmap bmp = new Bitmap( 320, 240, PixelFormat.Format24bppRgb );
        for ( int i = 0; i < 100; i++ )
        {
            bmp.SetPixel( i, i, Color.FromArgb( i, 0, 255 - i ) );
            writer.AddFrame( bmp );
        }
        bmp.Dispose( );
    }
    catch ( ApplicationException ex )
    {
    }
    writer.Dispose( );
}


When I removed the catch() at the bottom, I got a "Exception unhandled: Failed creating compressed stream" message

Can anyone please help me identify the problem so I can fix it.

I've tried running the entire source code, but opening and saving video doesn't work there either.

tvb

AnswerRe: AForge.net writer.Open problem Pin
tvbarnard1-Jul-09 8:07
tvbarnard1-Jul-09 8:07 
GeneralRe: AForge.net writer.Open problem Pin
Luc Pattyn1-Jul-09 8:24
sitebuilderLuc Pattyn1-Jul-09 8:24 
GeneralRe: AForge.net writer.Open problem Pin
tvbarnard1-Jul-09 8:52
tvbarnard1-Jul-09 8:52 
Questionhow to click a link in axwebbrowser Pin
T_Teef1-Jul-09 7:31
T_Teef1-Jul-09 7:31 
AnswerRe: how to click a link in axwebbrowser Pin
dan!sh 1-Jul-09 7:56
professional dan!sh 1-Jul-09 7:56 
QuestionRe: how to click a link in axwebbrowser Pin
T_Teef1-Jul-09 8:00
T_Teef1-Jul-09 8:00 
QuestionGraphicsPath.AddString vs Graphics.MeasureString Pin
nryk1-Jul-09 7:25
nryk1-Jul-09 7:25 
AnswerRe: GraphicsPath.AddString vs Graphics.MeasureString Pin
I Believe In GOD1-Jul-09 10:54
I Believe In GOD1-Jul-09 10:54 
Questionwindows login with own application..... Pin
S K Y1-Jul-09 5:50
S K Y1-Jul-09 5:50 
AnswerRe: windows login with own application..... Pin
DoctorMick1-Jul-09 6:05
DoctorMick1-Jul-09 6:05 
GeneralRe: windows login with own application..... Pin
S K Y1-Jul-09 8:19
S K Y1-Jul-09 8:19 
GeneralRe: windows login with own application..... Pin
Dave Kreskowiak1-Jul-09 8:55
mveDave Kreskowiak1-Jul-09 8:55 
GeneralRe: windows login with own application..... Pin
Christian Graus1-Jul-09 12:36
protectorChristian Graus1-Jul-09 12:36 
AnswerRe: windows login with own application..... Pin
0x3c01-Jul-09 6:12
0x3c01-Jul-09 6:12 
GeneralRe: windows login with own application..... Pin
S K Y1-Jul-09 8:24
S K Y1-Jul-09 8:24 
AnswerRe: windows login with own application..... Pin
Ravi Bhavnani1-Jul-09 6:45
professionalRavi Bhavnani1-Jul-09 6:45 
AnswerRe: windows login with own application..... Pin
Christian Graus1-Jul-09 12:37
protectorChristian Graus1-Jul-09 12:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.