1
0
mirror of https://github.com/alfanhui/mbtilesToPngs.git synced 2025-05-27 20:30:12 -07:00

Forgot the structure is {y}.png, so ammended to reflect correct structure

This commit is contained in:
Alfanhui 2018-06-06 22:44:15 +01:00
parent d1a3c18e4d
commit 463f254edc
2 changed files with 2 additions and 4 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -42,7 +42,6 @@ def select_all_images(conn):
result['column'],
result['row'],
row[0],
row[1]
)
@ -69,11 +68,10 @@ def mkdir_p(path):
raise
def blobToFile(dir0, dir1, dir2, ablob, afile):
def blobToFile(dir0, dir1, dir2, ablob):
mkdir_p("./" + dir0) # zoom
mkdir_p("./" + dir0 + "/" + dir1) # column
mkdir_p("./" + dir0 + "/" + dir1 + "/" + dir2) # row
filename = "./" + dir0 + "/" + dir1 + "/" + dir2 + "/" + afile + ".png"
filename = "./" + dir0 + "/" + dir1 + "/" + dir2 + ".png"
with open(filename, 'wb') as output_file:
output_file.write(ablob)