moved Image.new after the subprocesses are started
This commit is contained in:
7
world.py
7
world.py
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user