byRef tiling improvement

Better logic for image tiling when dimensions exceed texture max avoids sliver tiles.