Re: [bug report] OverflowError: signed integer is greater than maximum
Julien Palard <[email protected]> Thu, 25 Jul 2013 17:20:36 +0200
| Newsgroups | gmane.comp.python.image |
|---|---|
| Message-ID | <CAEA7nhrJnAwXwS-QCFf_DTNKqF9=bx3ufowLLHzi4kHJ=LvcWg@mail.gmail.com> |
--===============0573384122== Content-Type: multipart/alternative; boundary=089e01183f289d5d5f04e25792e5 --089e01183f289d5d5f04e25792e5 Content-Type: text/plain; charset=ISO-8859-1 I jiust reproduced the bug with another image that I can publicly release, so you may easily reproduce it : http://mandark.fr/art/art/2011/01/16/2011-01-16-14-54-22.jpg On Thu, Jul 25, 2013 at 5:11 PM, Julien Palard <[email protected]> wrote: > Hi there, I'm facing a bug in PIL, from the stable Debian Package, don't > know the PIL exact version number as it's not exposed by the package but I > got : > > apt-cache policy python-imaging > python-imaging: > Installed: 1.1.7-4 > > Here come the bug : > > $ python > Python 2.7.3 (default, Jan 2 2013, 13:56:14) > [GCC 4.7.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> from PIL import Image as PILImage > >>> from pilkit.utils import save_image > >>> > >>> img = PILImage.open('./1889935.jpg') > >>> save_image(img, '/tmp/1889935.jpg', 'JPEG', {}, True) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/usr/local/lib/python2.7/dist-packages/pilkit-1.0.0-py2.7.egg/pilkit/utils.py", > line 175, in save_image > img.save(outfile, format, **options) > File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1439, in save > save_handler(self, fp, filename) > File "/usr/lib/python2.7/dist-packages/PIL/JpegImagePlugin.py", line > 471, in _save > ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)]) > File "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py", line 499, in > _save > s = e.encode_to_file(fh, bufsize) > OverflowError: signed integer is greater than maximum > > How I may help ? > > -- > Julien Palard - http://julien.palard.fr > IRC : [email protected], [email protected] > TEL : 06.21.19.49.10 / FAX : 09.72.28.06.72 > -- Julien Palard - http://julien.palard.fr IRC : [email protected], [email protected] TEL : 06.21.19.49.10 / FAX : 09.72.28.06.72 --089e01183f289d5d5f04e25792e5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">I jiust reproduced the bug with another image that I can p= ublicly release, so you may easily reproduce it :<br><br><a href=3D"http://= mandark.fr/art/art/2011/01/16/2011-01-16-14-54-22.jpg">http://mandark.fr/ar= t/art/2011/01/16/2011-01-16-14-54-22.jpg</a><br> </div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Thu,= Jul 25, 2013 at 5:11 PM, Julien Palard <span dir=3D"ltr"><<a href=3D"ma= ilto:[email protected]" target=3D"_blank">[email protected]</a>></span> wr= ote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Hi there, I'm faci= ng a bug in PIL, from the stable Debian Package, don't know the PIL exa= ct version number as it's not exposed by the package but I got :<br> <br>apt-cache policy python-imaging<br> python-imaging:<br>=A0 Installed: 1.1.7-4<br><br></div>Here come the bug :<= br><div><br>$ python<br>Python 2.7.3 (default, Jan=A0 2 2013, 13:56:14) <br= >[GCC 4.7.2] on linux2<br>Type "help", "copyright", &qu= ot;credits" or "license" for more information.<br> >>> from PIL import Image as PILImage<br>>>> from pilkit.= utils import save_image<br>>>> <br>>>> img =3D PILImage.o= pen('./1889935.jpg')<br>>>> save_image(img, '/tmp/1889= 935.jpg', 'JPEG', {}, True)<br> Traceback (most recent call last):<br>=A0 File "<stdin>", l= ine 1, in <module><br>=A0 File "/usr/local/lib/python2.7/dist-pa= ckages/pilkit-1.0.0-py2.7.egg/pilkit/utils.py", line 175, in save_imag= e<br> =A0=A0=A0 img.save(outfile, format, **options)<br>=A0 File "/usr/lib/p= ython2.7/dist-packages/PIL/Image.py", line 1439, in save<br>=A0=A0=A0 = save_handler(self, fp, filename)<br>=A0 File "/usr/lib/python2.7/dist-= packages/PIL/JpegImagePlugin.py", line 471, in _save<br> =A0=A0=A0 ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, raw= mode)])<br>=A0 File "/usr/lib/python2.7/dist-packages/PIL/ImageFile.py= ", line 499, in _save<br>=A0=A0=A0 s =3D e.encode_to_file(fh, bufsize)= <br>OverflowError: signed integer is greater than maximum<br> <br></div><div>How I may help ?<span class=3D"HOEnZb"><font color=3D"#88888= 8"><br clear=3D"all"></font></span></div><span class=3D"HOEnZb"><font color= =3D"#888888"><div><div><br>-- <br>Julien Palard - <a href=3D"http://julien.= palard.fr" target=3D"_blank">http://julien.palard.fr</a><br> IRC : <a href=3D"mailto:[email protected]" target=3D"_blank">mandark@fre= enode.net</a>, <a href=3D"mailto:[email protected]" target=3D"_blank">ma= [email protected]</a><br> TEL : 06.21.19.49.10 / FAX : 09.72.28.06.72<br> </div></div></font></span></div> </blockquote></div><br><br clear=3D"all"><br>-- <br>Julien Palard - <a href= =3D"http://julien.palard.fr" target=3D"_blank">http://julien.palard.fr</a><= br>IRC : <a href=3D"mailto:[email protected]" target=3D"_blank">mandark@= freenode.net</a>, <a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a><br> TEL : 06.21.19.49.10 / FAX : 09.72.28.06.72<br> </div> --089e01183f289d5d5f04e25792e5-- --===============0573384122== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig --===============0573384122==--