private void ToWoWTextureButton_Click(object sender, EventArgs e)
        {
            Image wowtexture = ImageTransforms.ArrayImages(CurrentEdit.GIFFrames);

            wowtexture = ImageTransforms.Resize(wowtexture, GetBestImageSize(wowtexture.Width, wowtexture.Height));
            WoWTexturePictureBox.Image = wowtexture;
        }
Пример #2
0
        public void MakeTransparent(Color color1, Color color2)
        {
            List <Image> images = new List <Image>();

            foreach (Image image in GIFFrames)
            {
                images.Add(ImageTransforms.MakeCopyWithColorRangeTransparent(color1, color2, image));
            }

            GIFFrames.ForEach(o => o.Dispose());
            GIFFrames = images;
        }
        private void GIFPictureBox_Click(object sender, EventArgs e)
        {
            using (Bitmap image = new Bitmap(GIFPictureBox.Image))
            {
                Point pixelLocation = GIFPictureBox.PointToClient(MousePosition);
                Color color         = image.GetPixel(pixelLocation.X, pixelLocation.Y);

                Color colorLow  = ImageTransforms.ModifyColor(color, -10);
                Color colorHigh = ImageTransforms.ModifyColor(color, 10);

                CurrentEdit.MakeTransparent(colorLow, colorHigh);
            }
            UpdateCurrentEditViews(CurrentEdit);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (CurrentEdit is null)
            {
                return;
            }
            using (CropForm newcrop = new CropForm(CurrentFrame))
            {
                newcrop.ShowDialog();

                var          CropArea = newcrop.CropArea;
                List <Image> images   = CurrentEdit.GIFFrames
                                        .Select(o => ImageTransforms.Crop(o, CropArea)).ToList();

                CurrentEdit.GIFFrames = images;
                //GIFEdit edit = new GIFEdit(ImageTransforms.ImagesToGIF(images), CurrentEdit.Name);
                //GIFEdits.Add(CurrentEdit);
                UpdateCurrentEditViews(CurrentEdit);
            }
        }