Example #1
0
        public IImageList Clone()
        {
            IImageList imageList = ImageList.Create();

            foreach (IImage image in this)
            {
                imageList.Add(image.Clone());
            }

            return(imageList);
        }
Example #2
0
        public unsafe void Apply(IImageList input, IImageList output)
        {
            int[] indices = Enumerable.Range(0, input.Count)
                            .Interpolate(TargetFrameCount);

            IImageList frames = ImageList.Create();

            foreach (int index in indices)
            {
                frames.Add(input[index]);
            }

            frames.CloneTo(output);
        }
Example #3
0
        private void MenuPanel_OpenFile(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog()
            {
                Filter      = OpenFileFilter,
                Multiselect = false
            };

            if (dialog.ShowDialog() == true && !Repository.ContainsKey(dialog.FileName))
            {
                try
                {
                    IImageList imageList = ImageList.Create();
                    imageList.FromFile(dialog.FileName);

                    Repository.Add(dialog.FileName, imageList);
                }
                catch (Exception ex)
                {
                    MessageService.ShowError(ex.Message);
                    LogService.LogError(ex);
                }
            }
        }