// Linear correction of YCbCr channels private void linearYCbCrFiltersItem_Click( object sender, System.EventArgs e ) { if ( image.PixelFormat != PixelFormat.Format24bppRgb ) { MessageBox.Show( "YCbCr linear correction is available for color images only", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation ); return; } YCbCrLinearForm form = new YCbCrLinearForm( new ImageStatisticsYCbCr( image ) ); form.Image = image; if ( form.ShowDialog( ) == DialogResult.OK ) { ApplyFilter( form.Filter ); } }
// Linear correction of YCbCr channels private void linearYCbCrFiltersItem_Click( object sender, System.EventArgs e ) { if ( CheckIfColor( "YCbCr linear correction" ) ) { YCbCrLinearForm form = new YCbCrLinearForm( new ImageStatisticsYCbCr( image ) ); form.Image = image; if ( form.ShowDialog( ) == DialogResult.OK ) { ApplyFilter( form.Filter ); } } }