public void PopulateBITMAPINFOHEADER32(ref AVIWriterImports.BITMAPINFOHEADER bmih)
 {
     bmih.Init();
     bmih.biPlanes    = 1;
     bmih.biBitCount  = 32;
     pitch            = width * 4;
     bmih.biHeight    = height;
     bmih.biWidth     = width;
     bmih.biSizeImage = (uint)(pitch * height);
 }
            public void PopulateBITMAPINFOHEADER24(ref AVIWriterImports.BITMAPINFOHEADER bmih)
            {
                bmih.Init();
                bmih.biPlanes   = 1;
                bmih.biBitCount = 24;
                bmih.biHeight   = height;

                // pad up width so that we end up with multiple of 4 bytes
                pitch            = width * 3;
                pitch            = (pitch + 3) & ~3;
                pitch_add        = pitch - (width * 3);
                bmih.biWidth     = width;
                bmih.biSizeImage = (uint)(pitch * height);
            }