[Image-SIG] Converting images to palette mode
Lukas Orsin
lukas.orsin at infinit.sk
Mon Jan 26 19:34:34 CET 2009
Hi,
We are converting much images (296,000 tiles) at size 256x256px from RGB to
Palette mode.
After about 200,000 converted images our simple program crashes with
quantization error:
..processing 129.png
..processing 130.png
Traceback (most recent call last):
File "C:\tmp\to8bit_folders_upgrade.py", line 35, in <module>
os.path.walk(cesta,start_image_crush, 'blablabla')
File "C:\ActivePython25\lib\ntpath.py", line 334, in walk
walk(name, func, arg)
File "C:\ActivePython25\lib\ntpath.py", line 334, in walk
walk(name, func, arg)
File "C:\ActivePython25\lib\ntpath.py", line 334, in walk
walk(name, func, arg)
File "C:\ActivePython25\lib\ntpath.py", line 334, in walk
walk(name, func, arg)
File "C:\ActivePython25\lib\ntpath.py", line 334, in walk
walk(name, func, arg)
File "C:\ActivePython25\lib\ntpath.py", line 328, in walk
func(arg, top, names)
File "C:\tmp\to8bit_folders_upgrade.py", line 29, in start_image_crush
im=im.convert('P', palette=Image.ADAPTIVE, colors=colors)
File "C:\ActivePython25\Lib\site-packages\PIL\Image.py", line 663, in
convert
im = self.im.quantize(colors)
ValueError: quantization error
Could anybody know whats the matter?
We are running at Windows 2003 R2 SP2 32bit / 3.5 GB RAM
and using os.path.walk funcion.
Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090126/86871626/attachment.htm>
More information about the Image-SIG
mailing list