ImageGlass.Library.Image.Animation.ExtractAllFrames C# (CSharp) Method

ExtractAllFrames() public method

Extract all frames of animation
public ExtractAllFrames ( string animationFile, string destinationFolder ) : void
animationFile string File name
destinationFolder string Output folder
return void
        public void ExtractAllFrames(string animationFile, string destinationFolder)
        {
            //initiate class

            _isAnimating = false;
            _filename = animationFile;
            _desFolder = destinationFolder;

            _img = new Bitmap(animationFile);
            _i = 1;

            //begin extract
            AnimateImage();
        }

Usage Example

Example #1
0
        private void mnuMainExtractFrames_Click(object sender, EventArgs e)
        {
            if (!(sender as ToolStripMenuItem).Enabled) // Shortcut keys still work even when menu is disabled!
                return;

            if (!GlobalSetting.IsImageError)
            {
                FolderBrowserDialog f = new FolderBrowserDialog();
                f.Description = GlobalSetting.LangPack.Items["frmMain._ExtractFrameText"];
                f.ShowNewFolderButton = true;
                DialogResult res = f.ShowDialog();

                if (res == DialogResult.OK && Directory.Exists(f.SelectedPath))
                {
                    Animation ani = new Animation();
                    ani.ExtractAllFrames(GlobalSetting.ImageList.GetFileName(GlobalSetting.CurrentIndex),
                                                f.SelectedPath);
                }

                f = null;
            }
        }
All Usage Examples Of ImageGlass.Library.Image.Animation::ExtractAllFrames