JImageTest::testCrop

Tests the JImage::crop() method. To test this we create an image that contains a red rectangle of a certain size [Rectangle1]. Inside of that rectangle [Rectangle1] we draw a white rectangle [Rectangle2] that is exactly two pixels smaller in width and height than its parent rectangle [Rectangle1]. Then we crop the image to the exact coordinates of Rectangle1 and verify both it's corners and the corners inside of it.