0

moved Image.new after the subprocesses are started

This commit is contained in:
Andrew Brown
2010-08-28 17:42:52 -04:00
parent 8817689276
commit 6d7e64a3d1
2 changed files with 4 additions and 3 deletions

0
render.py Normal file → Executable file
View File

View File

@@ -105,9 +105,6 @@ def render_world(worlddir, cavemode=False, procs=2):
print "Don't worry though, that's just the memory requirements" print "Don't worry though, that's just the memory requirements"
print "The final png will be much smaller" print "The final png will be much smaller"
# Oh god create a giant ass image
worldimg = Image.new("RGBA", (width, height))
# Sort the chunks by their row, so when we loop through them it goes top to # Sort the chunks by their row, so when we loop through them it goes top to
# bottom # bottom
print "Sorting chunks..." print "Sorting chunks..."
@@ -121,6 +118,10 @@ def render_world(worlddir, cavemode=False, procs=2):
kwds=dict(cave=cavemode)) kwds=dict(cave=cavemode))
resultsmap[(chunkx, chunky)] = result resultsmap[(chunkx, chunky)] = result
# Oh god create a giant ass image
print "Allocating memory for the giant image"
worldimg = Image.new("RGBA", (width, height))
print "Processing chunks!" print "Processing chunks!"
processed = 0 processed = 0
starttime = time.time() starttime = time.time()