Esempio n. 1
0
        private void colorDistancingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (image != null)
            {
                int[] inputs   = NETIO.InputInt(2, "Details", "Distancing Info", new string[] { "Minimum Alpha", "Count" }, new string[] { "64", "3" });
                int   minAlpha = inputs[0];
                int   input    = inputs[1];

                string[] labels   = new string[input];
                string[] defaults = new string[input];

                for (int i = 0; i < input; i++)
                {
                    labels[i]   = "Color #" + (i + 1).ToString();
                    defaults[i] = "0, 0, 0";
                }

                string[] colorsString = NETIO.InputString(input, "Details", "Specify Colors", labels, defaults);
                Color[]  colors       = new Color[input];
                for (int i = 0; i < input; i++)
                {
                    string s = colorsString[i];
                    s = s.Replace(" ", "");
                    string[] vals = s.Split(',');
                    colors[i] = Color.FromArgb(int.Parse(vals[0]), int.Parse(vals[1]), int.Parse(vals[2]));
                }
                previousStates.Add(image);
                image = ImageTools.SegmentImage(image, colors, minAlpha);
                DrawImage();
            }
        }
Esempio n. 2
0
        private void increaseColorsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (image != null)
            {
                int[] rgbVals = NETIO.InputInt(3, "Color", "RGB Values", new string[] { "R:", "G:", "B:" }, new string[] { "", "", "" });

                previousStates.Add(new Bitmap(image));
                image = ImageTools.IncreaseColors(image, rgbVals[0], rgbVals[1], rgbVals[2]);
                DrawImage();
            }
        }
Esempio n. 3
0
        private void ditheringToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (image != null)
            {
                int[] vals = NETIO.InputInt(3, "Details", "Effect Details", new string[] { "Color Count", "Iterations", "Minimum Alpha" }, new string[] { "16", "2", "64" });

                previousStates.Add(new Bitmap(image));
                image = ImageTools.SegmentImage(vals[0], image, vals[1], vals[2]);
                DrawImage();
            }
        }
Esempio n. 4
0
        private void circleSamplingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (image != null)
            {
                int[] vals = NETIO.InputInt(4, "Details", "Effect Details", new string[] { "Samples", "Radius", "Alpha", "Scaling" }, new string[] { "1600", "50", "96", "2" });

                previousStates.Add(image);
                image = ImageTools.CircleSampling(image, vals[0], vals[1], vals[2], vals[3]);
                DrawImage();
            }
        }
Esempio n. 5
0
        private void bubbleEffectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (image != null)
            {
                float[] vals = NETIO.InputFloat(3, "Details", "Effect Details", new string[] { "Bubble Count", "Bubble Opacity Divider", "Image Mixing Divider" }, new string[] { "", "", "" });

                previousStates.Add(image);
                image = ImageTools.BubbleEffect(image, (int)vals[0], vals[1], vals[2]);
                DrawImage();
            }
        }