Exemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     GistogramColor.mainWindow = this;
     ActionImage.mainWindow    = this;
     image = showImage();    //Отображаем картинку
     ActionImage.bmpImg   = ActionImage.BitmapImage2Bitmap(image);
     ActionImage.Standard = image;
     ActionImage.loadPanel("Стандарт");
 }
Exemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Thread thread;
            string current = (listAction.SelectedItem as TextBlock).Text;

            switch (current)
            {
            case "Чёрно-белый":
                ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image);
                thread             = new Thread(ActionImage.BlachAndWhite)
                {
                    IsBackground = true
                };
                thread.Start();
                break;

            case "Стандарт":
                ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image);
                thread             = new Thread(ActionImage.ColorEqualizer)
                {
                    IsBackground = true
                };
                thread.Start();
                break;

            case "Негатив":
                ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image);
                thread             = new Thread(ActionImage.Negative)
                {
                    IsBackground = true
                };
                thread.Start();
                break;

            case "Оттенки серого":
                ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image);
                thread             = new Thread(ActionImage.GrayShade)
                {
                    IsBackground = true
                };
                thread.Start();
                break;

            case "Яркость":
                ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image);
                thread             = new Thread(ActionImage.Brightness)
                {
                    IsBackground = true
                };
                thread.Start();
                break;

            case "Контраст":
                ActionImage.bmpImg = ActionImage.BitmapImage2Bitmap(image);
                thread             = new Thread(ActionImage.Contrast)
                {
                    IsBackground = true
                };
                thread.Start();
                break;
            }
        }