From 6d7e64a3d13a016692de20c08a84e1a9318e7b92 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Sat, 28 Aug 2010 17:42:52 -0400 Subject: [PATCH] moved Image.new after the subprocesses are started --- render.py | 0 world.py | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 render.py diff --git a/render.py b/render.py old mode 100644 new mode 100755 diff --git a/world.py b/world.py index 9d3f668..095a33d 100644 --- a/world.py +++ b/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 "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 # bottom print "Sorting chunks..." @@ -121,6 +118,10 @@ def render_world(worlddir, cavemode=False, procs=2): kwds=dict(cave=cavemode)) 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!" processed = 0 starttime = time.time()