split rectangular images into tiles