Exemple #1
0
        // Modify contrast
        private void Contrast( )
        {
            if ( image.PixelFormat != PixelFormat.Format24bppRgb )
            {
                MessageBox.Show( "Contrast filter using HSL color space is available for color images only", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation );
                return;
            }

            ContrastForm form = new ContrastForm( );
            form.Image = image;

            if ( form.ShowDialog( ) == DialogResult.OK )
            {
                ApplyFilter( form.Filter );
            }
        }
Exemple #2
0
        // Modify contrast
        private void Contrast( )
        {
            if ( CheckIfColor( "Contrast filter using HSL color space" ) )
            {
                ContrastForm form = new ContrastForm( );
                form.Image = image;

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