from PIL import Image src_img = Image.open('/home/enne2/dev/asset-maker/assets/poses/sources/lpc-revised/Terrain/terrain_spring.png').convert('RGBA') # The plain grass tile in LPC terrain is typically at col 4, row 1 (0-indexed) tx, ty = 4, 1 box = (tx * 32, ty * 32, (tx + 1) * 32, (ty + 1) * 32) tile32 = src_img.crop(box) # Strategy 1: Tile it 2x2 to make a 64x64 image img_tiled = Image.new('RGBA', (64, 64)) img_tiled.paste(tile32, (0, 0)) img_tiled.paste(tile32, (32, 0)) img_tiled.paste(tile32, (0, 32)) img_tiled.paste(tile32, (32, 32)) img_tiled.save('/home/enne2/dev/mice/tools/lpc_extract/BMP_1_GRASS_1_tiled.png') # Strategy 2: Scale it 2x to make a 64x64 image img_scaled = tile32.resize((64, 64), Image.NEAREST) img_scaled.save('/home/enne2/dev/mice/tools/lpc_extract/BMP_1_GRASS_1_scaled.png') print("Created BMP_1_GRASS_1_tiled.png and BMP_1_GRASS_1_scaled.png")