Exemplo n.º 1
0
        public void TestCropImage()
        {
            const string outputFilePath = "../../Output/CropImage.jpg";

            var thisImage = new NetImage();

            thisImage.LoadImage("../../Resources/1024x768.png");
            thisImage.Filename = outputFilePath;
            thisImage.CropImage(10, 50, 800, 600);
            thisImage.SaveImage();

            int width, height;

            thisImage.GetImageFileSize(outputFilePath, out width, out height);

            Assert.AreEqual(800, width);
            Assert.AreEqual(600, height);
        }