Fixing a bug that would cause images with an odd number (as opposed to
an even number) of pixels along a dimension to be displayed starting
at 2 for that axis. The bug was fixed by using proper modulo integer
arithmetic instead of floats.