Out of memory when exporting UV layout

I tried to export a 10000x10000 UV layout with theeth’s script, but before it was finished, it returned a memory error from Python :-|:

Traceback (most recent call last):
File “<string>”, line 134, in bevent
File “<string>”, line 207, in UV_Export
File “<string>”, line 141, in Buffer

Am I doing something wrong, or does Python really just give up when it’s out of memory? I only have 512 MB and I saw through the task manager that it already used 566 MB. I expected it to continue, only slower, because it would need to swap. I closed as many background applications as possible, but would anyone have any tips to save more memory? Launching the script through the console perhaps?

WinXP Home
Blender 2.37a
Python 2.3.3
Intel Celeron 2.66 GHz

How many polys is the mesh?

Teeth´s script? Put a link to it.

It only has 580 vertices. I think it’s more the image size that crashes it. The script is the Save UV Face Layout script that comes with Blender. (UV window -> UV -> Save UV Face Layout…)

The buffer function (i wrote the tga tools ) allots 3 bytes for one pixel in memory . So : 10000 x 10000 x 3 = 300 000 000 bytes .

imo, the most essential and proven python stuff should get into blender native code - like UV import/export, UV template export, OBJ and 3DS import/export - at least.

try with 2500x2500 or 5000x5000 and make it 4 or 2 times bigger in gimp.

Sometimes I just need other people to turn on this little switch in my brain. Thanks!