Handle non-square images. Detect completion