Beispiel #1
0
        //Resets the current image back to its original state
        private void btnReset_Click(object sender, RoutedEventArgs e)
        {
            if (Load())
            {
                _processedImage = new BitmapImage(new Uri(_imgPath));
                DisplayProcessedWindow();

                ImageModifications.Initialize(_imgPath);
            }
            else
            {
                NotLoadedMessage();
            }
        }
Beispiel #2
0
        private void btnLoad_Click(object sender, RoutedEventArgs e)
        {
            //Opens a File System Dialog
            OpenFileDialog op = new OpenFileDialog();

            op.Title = "Select a picture";
            //Filters the seen results by the appropriate extensions
            op.Filter = "All supported graphics|*.jpg;*.jpeg;*.png|" +
                        "JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" +
                        "Portable Network Graphic (*.png)|*.png";

            //Loads the chosen image and displays it in a separate window
            //Prepares the newly loaded image for the upcoming modifications
            if (op.ShowDialog() == true)
            {
                _imgPath = op.FileName;

                DisplayOriginalWindow();

                ImageModifications.Initialize(_imgPath);
            }
        }