// Update filter
 private void UpdateFilter()
 {
     filter.Y  = yRange;
     filter.Cb = cbRange;
     filter.Cr = crRange;
     filterPreview.RefreshFilter();
 }
Esempio n. 2
0
 // Update filter
 private void UpdateFilter()
 {
     filter.Red   = red;
     filter.Green = green;
     filter.Blue  = blue;
     filterPreview.RefreshFilter();
 }
Esempio n. 3
0
 // Pixel width changed
 private void sizeBox_TextChanged(object sender, System.EventArgs e)
 {
     try
     {
         filter.PixelWidth = int.Parse(widthBox.Text);
         filterPreview.RefreshFilter();
     }
     catch (Exception)
     {
     }
 }
Esempio n. 4
0
        // Sigma changed
        private void sigmaBox_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                filter.Sigma = double.Parse(sigmaBox.Text);

                filterPreview.RefreshFilter();
            }
            catch (Exception)
            {
            }
        }
        // Update center color
        private void UpdateCenterColor()
        {
            // update slider colors
            redSlider.Color1   = Color.FromArgb(0, green, blue);
            redSlider.Color2   = Color.FromArgb(255, green, blue);
            greenSlider.Color1 = Color.FromArgb(red, 0, blue);
            greenSlider.Color2 = Color.FromArgb(red, 255, blue);
            blueSlider.Color1  = Color.FromArgb(red, green, 0);
            blueSlider.Color2  = Color.FromArgb(red, green, 255);

            // update filter
            filter.CenterColor = Color.FromArgb(red, green, blue);
            filterPreview.RefreshFilter();
        }
Esempio n. 6
0
 // value of brightness text box changed
 private void brightnessBox_TextChanged(object sender, System.EventArgs e)
 {
     try
     {
         filter.AdjustValue = double.Parse(brightnessBox.Text);
         filterPreview.RefreshFilter();
     }
     catch (Exception)
     {
     }
 }
Esempio n. 7
0
 // value of contrast text box changed
 private void contrastBox_TextChanged(object sender, System.EventArgs e)
 {
     try
     {
         filter.Factor = double.Parse(contrastBox.Text);
         filterPreview.RefreshFilter();
     }
     catch (Exception)
     {
     }
 }
Esempio n. 8
0
 // Hue changed
 private void hueBox_TextChanged(object sender, System.EventArgs e)
 {
     try
     {
         huePicker.Min = filter.Hue = int.Parse(hueBox.Text);
         filterPreview.RefreshFilter();
     }
     catch (Exception)
     {
     }
 }
Esempio n. 9
0
        // Update filert
        private void UpdateFilter()
        {
            // input values
            filter.InLuminance  = inLuminance;
            filter.InSaturation = inSaturation;
            // output values
            filter.OutLuminance  = outLuminance;
            filter.OutSaturation = outSaturation;

            filterPreview.RefreshFilter();
        }
Esempio n. 10
0
 // Update filter
 private void UpdateFilter()
 {
     filter.Hue        = hue;
     filter.Saturation = saturation;
     filter.Luminance  = luminance;
     filterPreview.RefreshFilter();
 }
Esempio n. 11
0
        // Factor changed
        private void factorBox_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                factor = Math.Max(0.1f, Math.Min(10.0f, float.Parse(factorBox.Text)));

                filter.Factor = factor;
                filterPreview.RefreshFilter();
            }
            catch (Exception)
            {
            }
        }
Esempio n. 12
0
        // Update filert
        private void UpdateFilter()
        {
            // input values
            filter.InY  = inY;
            filter.InCb = inCb;
            filter.InCr = inCr;
            // output values
            filter.OutY  = outY;
            filter.OutCb = outCb;
            filter.OutCr = outCr;

            filterPreview.RefreshFilter();
        }
Esempio n. 13
0
        // Update filert
        private void UpdateFilter()
        {
            // input values
            filter.InRed   = inRed;
            filter.InGreen = inGreen;
            filter.InBlue  = inBlue;
            // output values
            filter.OutRed   = outRed;
            filter.OutGreen = outGreen;
            filter.OutBlue  = outBlue;

            filterPreview.RefreshFilter();
        }
Esempio n. 14
0
 // Refresh filter
 private void RefreshPreview()
 {
     filter.Min = min;
     filter.Max = max;
     filterPreview.RefreshFilter();
 }
Esempio n. 15
0
 // Value changed of percentage scroll bar
 private void percentageBar_ValueChanged(object sender, System.EventArgs e)
 {
     filter.Percent = (double)percentageBar.Value / 100.0;
     filterPreview.RefreshFilter( );
 }