private void btnCompress_Click(object sender, RoutedEventArgs e) { var imgKontrolka = imgPhotoBefore; var imgEmgu = PrzetwarzaczObrazow.kowertujImageNaEmgu(imgKontrolka); imgEmgu = PrzetwarzaczObrazow.kompresujObraz(imgEmgu); PrzetwarzaczObrazow.umiescObrazEmguWKontrolceImage(imgEmgu, imgPhotoAfter); }
private void btnLoad_Click(object sender, RoutedEventArgs e) { OpenFileDialog op = new OpenFileDialog(); op.Title = "Select a picture"; op.Filter = "All supported graphics|*.jpg;*.jpeg;*.png|" + "JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" + "Portable Network Graphic (*.png)|*.png"; if (op.ShowDialog() == true) { string file = op.FileName; imgPhotoBefore.Source = new BitmapImage(new Uri(op.FileName)); EmguImg = PrzetwarzaczObrazow.kowertujImageNaEmgu(imgPhotoBefore); } }