Hey everyone,
I am currently creating images pixel by pixel. This is too slow for many images. Anyways, I want to use the fromstring module in the Image library. I have read at this url, http://effbot.org/imagingbook/decoder.htm, that I use an unsigned little endian 16 bit decoder in the calling of the function.
My segment that is called looks like this:
img2=Image.from string("L",(512 ,512),dummystri ng2,"raw", "F;16")
However I run into some type of library issue that I have yet to solve.
Traceback (most recent call last):
File "<pyshell#4 1>", line 1, in <module>
img2=Image.from string("L",(512 ,512),dummystri ng2,"raw", "F;16")
File "C:\Python25\li b\site-packages\PIL\Im age.py", line 1744, in fromstring
im.fromstring(d ata, decoder_name, args)
File "C:\Python25\li b\site-packages\PIL\Im age.py", line 570, in fromstring
d = _getdecoder(sel f.mode, decoder_name, args)
File "C:\Python25\li b\site-packages\PIL\Im age.py", line 373, in _getdecoder
return apply(decoder, (mode,) + args + extra)
ValueError: unknown raw mode
Am I supposed to import some decoder library, and if so, which one?
Thanks alot,
JP
I am currently creating images pixel by pixel. This is too slow for many images. Anyways, I want to use the fromstring module in the Image library. I have read at this url, http://effbot.org/imagingbook/decoder.htm, that I use an unsigned little endian 16 bit decoder in the calling of the function.
My segment that is called looks like this:
img2=Image.from string("L",(512 ,512),dummystri ng2,"raw", "F;16")
However I run into some type of library issue that I have yet to solve.
Traceback (most recent call last):
File "<pyshell#4 1>", line 1, in <module>
img2=Image.from string("L",(512 ,512),dummystri ng2,"raw", "F;16")
File "C:\Python25\li b\site-packages\PIL\Im age.py", line 1744, in fromstring
im.fromstring(d ata, decoder_name, args)
File "C:\Python25\li b\site-packages\PIL\Im age.py", line 570, in fromstring
d = _getdecoder(sel f.mode, decoder_name, args)
File "C:\Python25\li b\site-packages\PIL\Im age.py", line 373, in _getdecoder
return apply(decoder, (mode,) + args + extra)
ValueError: unknown raw mode
Am I supposed to import some decoder library, and if so, which one?
Thanks alot,
JP
Comment