Ejemplo n.º 1
0
        // HSL linear correction
        private void linearHslFiltersItem_Click( object sender, System.EventArgs e )
        {
            if ( image.PixelFormat != PixelFormat.Format24bppRgb )
            {
                MessageBox.Show( "HSL linear correction is available for color images only", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation );
                return;
            }

            HSLLinearForm form = new HSLLinearForm( new ImageStatisticsHSL( image ) );
            form.Image = image;

            if ( form.ShowDialog( ) == DialogResult.OK )
            {
                ApplyFilter( form.Filter );
            }
        }
Ejemplo n.º 2
0
        // HSL linear correction
        private void linearHslFiltersItem_Click( object sender, System.EventArgs e )
        {
            if ( CheckIfColor( "HSL linear correction" ) )
            {
                HSLLinearForm form = new HSLLinearForm( new ImageStatisticsHSL( image ) );
                form.Image = image;

                if ( form.ShowDialog( ) == DialogResult.OK )
                {
                    ApplyFilter( form.Filter );
                }
            }
        }