예제 #1
0
        private void transform_Click(object sender, RoutedEventArgs e)
        {
            Bitmap img = new Bitmap(System.Drawing.Image.FromFile(openFile.FileName));

            image.ToMainColors(img);
            imgview.Source = image.Convert(img);
        }
예제 #2
0
        public void ConvertTests()
        {
            // Arrange
            var    img      = new ImgViewModel();
            Bitmap image    = new Bitmap(@"zielone.jpg");
            var    expected = typeof(BitmapImage);

            // Act
            var actual = img.Convert(image);

            //Assert
            Assert.IsType(expected, actual);
        }