Color filter form.
Inheritance: System.Windows.Forms.Form
Exemplo n.º 1
0
        /// <summary>
        /// Convert selected image to a color filter
        /// </summary>
        private void con_Color_Click(object sender, EventArgs e)
        {
            var colorFilter = new ColorFilter();

            if (colorFilter.ShowDialog() == DialogResult.OK)
            {
                this.Cursor = Cursors.WaitCursor;

                ApplyActionToFrames("Color filter", ActionEnum.Color, 0F, Color.FromArgb(colorFilter.Alpha, colorFilter.Red, colorFilter.Green, colorFilter.Blue));
                GC.Collect();

                this.Cursor = Cursors.Default;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Convert selected image to a color filter
        /// </summary>
        private void Color_Click(object sender, EventArgs e)
        {
            var colorFilter = new ColorFilter();

            if (colorFilter.ShowDialog() == DialogResult.OK)
            {
                this.Cursor = Cursors.WaitCursor;

                //TODO: Change this to a simple merge instead of color matrix.
                //float red = colorFilter.Red / 255F;
                //float green = colorFilter.Green / 255F;
                //float blue = colorFilter.Blue / 255F;
                //float alpha = colorFilter.Alpha / 255F;

                //var color = new float[] { red, green, blue, alpha };

                ApplyActionToFrames("Color filter", ActionEnum.Color, 0F, Color.FromArgb(colorFilter.Alpha, colorFilter.Red, colorFilter.Green, colorFilter.Blue));
                GC.Collect();

                this.Cursor = Cursors.Default;
            }
        }