问题
I need to request several image tiles from a server and plot them in the new image object and save it as a jpg file. Image tile name starts at its position in new image object: e.g. position:x0,y0 --> Tile name: 00 I know how to do https request, and how to create new empty image objects I can use PIL:
import requests
from PIL import Image
url = f‘https://myserver.com/GetTile/{tileKey}’
imageTile = requests.get(url)
image_sheet = Image.new("RGB", (8192, 4096))
Where I have stuck is how to horizontally loop over new image object to form the tile name, and later requesting from the server the tile and place it in the new image_sheet. And repeat the process until all tiles are on the place. When it is done save the result as a file. Please help to the python noob.
来源:https://stackoverflow.com/questions/61630596/how-to-plot-several-image-tiles-in-new-emty-image-object-based-on-image-tile-nam