public static Pixbuf ProcessBitmap(VirtualCamera camera) { if (camera != null) { var bm = camera.Bitmap(); if (bm != null) { using (MemoryStream stream = new MemoryStream()) { bm.Save(stream, ImageFormat.Bmp); stream.Position = 0; return(new Pixbuf(stream)); } } } return(null); }