Esempio n. 1
0
 public static void AddBmpInAvi(Image bmp)
 {
     using (Bitmap b = ScreenModel.GetPicThumbnail(bmp, 100).ToBitmap())
     {
         writer.WriteVideoFrame(b);
     }
 }
Esempio n. 2
0
 public static void AddBmpInAvi(Image bmp)
 {
     using (Bitmap b = ScreenModel.GetPicThumbnail(bmp, 80).ToBitmap())
     {
         b.SetPixel(0, 0, Color.Red);
         avi.AddFrame(b);
     }
 }
Esempio n. 3
0
        private void Time_Tick(object sender, EventArgs e)
        {
            Graphics gs = this.CreateGraphics();

            this.OnPaint(new PaintEventArgs(gs, new Rectangle()));
            Image result = ScreenModel.GetScreenBitmap((Screen)comboBox1.SelectedValue);

            if (isRecord)
            {
                if (AccordRecord)
                {
                    AccordModel.AddBmpInAvi((Image)result.Clone());
                }
                if (AForgeRecord)
                {
                    AForgeModel.AddBmpInAvi((Image)result.Clone());
                }
            }
            Image img = ScreenModel.GetPicThumbnail(result, 50, this.panel1.Height, this.panel1.Width);

            gs.DrawImage(img, panel1.Location);
        }