Beispiel #1
0
 public void ShouldThrowExceptionWhenAffineMatrixIsNull()
 {
     using (var image = new MagickImage(MagickColors.Purple, 1, 1))
     {
         Assert.Throws <ArgumentNullException>("affineMatrix", () => image.AffineTransform(null));
     }
 }
Beispiel #2
0
            public void ShouldChangeTheSizeOfTheImage()
            {
                using (var image = new MagickImage(Files.Builtin.Wizard))
                {
                    var affineMatrix = new DrawableAffine(1, 0.5, 0, 0, 0, 0);
                    image.AffineTransform(affineMatrix);

                    Assert.Equal(482, image.Width);
                    Assert.Equal(322, image.Height);
                }
            }