Ejemplo n.º 1
0
        async Task SaveAsync(string location)
        {
            if (ActionForm.SelectedEdit)
            {
                Close();
                EditGifForm.EditGif(frames, captureT.Interval, quality, repeat);
                return;
            }
            if (string.IsNullOrEmpty(location))
            {
                FreeFramesMemory(frames);
                Close();
                return;
            }

            timeL.Text = "Guardando...";
            var progress = new Progress <float>();

            progress.ProgressChanged += (s, f) => timeL.Text = String.Format("Guardando {0}...", f.ToString("P"));

            await EncodeGifBytes(frames, captureT.Interval, quality, repeat, location, progress);

            FreeFramesMemory(frames);

            Close();
        }
Ejemplo n.º 2
0
        public static void EditGif(List <byte[]> frames, int delay, int quality, int repeat)
        {
            using (var egf = new EditGifForm())
            {
                egf.frames  = frames;
                egf.delay   = delay;
                egf.quality = quality;
                egf.repeat  = repeat;

                egf.ShowDialog();
            }
        }