how to put a 256 * 384 tile image into a 256 * 256 tile grid without out of the grid bound