isCorner check optimized, test works on two different physical devices, achieved by alternate bigger and smaller resizing