Skip to content

Commit

Permalink
Minor tweaks, commenting, going to wait for AnvilChunk before pulling.
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Apr 13, 2012
1 parent 218b7f3 commit c7232f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/map.py
Expand Up @@ -276,6 +276,7 @@ def main(world_folder):
else:
try:
i = 0.0
start = time.time()
for chunk in world.iter_chunks():
if i % 50 == 0:
sys.stdout.write("Rendering image")
Expand All @@ -288,7 +289,8 @@ def main(world_folder):
chunkmap = get_map(chunk)
x, z = chunk.get_coords()
map.paste(chunkmap, (16 * (x - bb.minx), 16 * (z - bb.minz)))
print(" done\n")
end = time.time()
print(" done %f\n", end - start)
filename = os.path.basename(world_folder) + ".png"
map.save(filename, "PNG")
print("Saved map as %s" % filename)
Expand Down

0 comments on commit c7232f3

Please sign in to comment.