private void panel1_Paint(object sender, PaintEventArgs e) { Bitmap bmp = new Bitmap(this.panel1.Width, this.panel1.Height); // In order to use DrawToBitmap, the image must have an INITIAL image. // Not sure why. Perhaps it uses this initial image as a mask??? Dunno. /*using (Graphics G = Graphics.FromImage(bmp)) * { * G.Clear(Color.Yellow); * }*/ bmp = (Bitmap)ImageCapture.DrawToImage(this.panel1); anpr.getValidPlate2(bmp, bmp.Width, bmp.Height); //bmp.Save("c:\\save.bmp", System.Drawing.Imaging.ImageFormat.Bmp); bmp.Dispose(); }