[Image-SIG] PIL bug report: touble in save jpeg file with quality=100 and optimize=True
Daniil Osokin
odaniil at gmail.com
Sat Jan 24 19:17:27 CET 2009
Hello
I have try to save jpeg file with quality=100 and optimize but get this:
-----------------------------------------------------------
Traceback (most recent call last):
File "D:\temp\Python-PIL-test\pil_test.py", line 29, in <module>
main("image_test.jpg")
File "D:\temp\Python-PIL-test\pil_test.py", line 23, in main
img.save(file_out, "JPEG", quality=100, optimize=True)
File "C:\Python25\Lib\site-packages\PIL\Image.py", line 1405, in save
save_handler(self, fp, filename)
File "C:\Python25\lib\site-packages\PIL\JpegImagePlugin.py", line
409, in _save
ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])
File "C:\Python25\Lib\site-packages\PIL\ImageFile.py", line 493, in _save
raise IOError("encoder error %d when writing image file" % s)
IOError: encoder error -2 when writing image file
-----------------------------------------------------------
But this lines work fine:
img.save(file_out, "JPEG", quality=80, optimize=True)
or
img.save(file_out, "JPEG", quality=100)
PIL version 1.1.6
Python 2.5.4
Windows XP SP3
test files are attached
Thanx
---
Daniil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image_test.jpg
Type: image/jpeg
Size: 2428090 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090124/3cd6de71/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pil_test.py
Type: application/octet-stream
Size: 772 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090124/3cd6de71/attachment-0001.obj>
More information about the Image-SIG
mailing list