Example #1
0
 private void OrientationHandler(object sender, SystemEventHandler.Orientation orientation)
 {
     if (orientation == SystemEventHandler.Orientation.Landscape)
     {
         pictureBox1.Image = mImageCrop.crop(2000, 1000, 400, 200);
     }
     else
     {
         pictureBox1.Image = mImageCrop.crop(2000, 1000, 200, 400);
     }
 }
        public void cropTest()
        {
            ImageCropper ic = new ImageCropper(Image.FromFile("testResources/test.png"));

            Image im = ic.crop(20, 20, 10, 10);

            Assert.AreEqual(10, im.Width);
            Assert.AreEqual(10, im.Height);
        }